##// END OF EJS Templates
Fix vanishing labels for first and last ticks....
Fix vanishing labels for first and last ticks. Extra space must be reserved by layout for the axes that have wide labels for first or last tick. Changed the logic how axis sizeHint is interpreted to make the previously irrelevant height or width (depending on orientation) of the sizeHint to indicate how far the widest label extends past the first/last tick, and adjust the grid size accordingly in layout. Reviewed-by: Mika Salmela

File last commit:

r1630:59aae3a9af82
r2443:5b27b7b1d72a RC2_1.2.1
Show More
examples-areachart.qdoc
30 lines | 950 B | text/plain | TextLexer
/ doc / src / examples-areachart.qdoc
Michal Klocek
Adds area chart...
r421 /*!
Tero Ahola
Fixing example documentation
r500 \example examples/areachart
Michal Klocek
Adds area chart...
r421 \title AreaChart Example
\subtitle
The example shows how to create simple area chart.
Tero Ahola
Documentation front page
r979 \image examples_areachart.png
Michal Klocek
Adds area chart...
r421
To create area charts, we need two QLineSeries instances. They are going to define upper and lower boundary of the area.
sauimone
fixed example paths in doc
r496 \snippet ../examples/areachart/main.cpp 1
Michal Klocek
Adds area chart...
r421
We add data to both series, we use stream operator.
sauimone
fixed example paths in doc
r496 \snippet ../examples/areachart/main.cpp 2
Michal Klocek
Adds area chart...
r421
Now we create QAreaSeries instance using two line series objects. We set the custom gradient fill and width of the outline.
sauimone
fixed example paths in doc
r496 \snippet ../examples/areachart/main.cpp 3
Michal Klocek
Adds area chart...
r421
Marek Rosa
Some docs fixes
r1630 In the end we create QChartView instance, set title, set anti-aliasing and add area series. We also create the default axes and specify the ranges on them.
Michal Klocek
Adds area chart...
r421
sauimone
fixed example paths in doc
r496 \snippet ../examples/areachart/main.cpp 4
Michal Klocek
Adds area chart...
r421
Chart is ready to be shown.
sauimone
fixed example paths in doc
r496 \snippet ../examples/areachart/main.cpp 5
Michal Klocek
Adds area chart...
r421
Tero Ahola
Documentation front page
r979 */