How to make QT Chart size larger than widget size?

17 views Asked by At

I am currently trying to generate a bar chart using QT. However, due to the number of entries on the x-axis, my bar chart has been squished up and the x-axis labels cannot be seen. Is there a way to make the chart larger than the widget size and enable horizontal scrolling?

Image of Problem

I have tried manually setting the width of the QChart object to be larger than the QChartView object but it simply squished the chart horizontally again. I also tried adding the Horizontal Scrolling policy and a QScrollBar but the scrollbar does not appear.

Source Code #1 Source Code #2

0

There are 0 answers