examples-areachart.qdoc
29 lines
| 917 B
| text/plain
|
TextLexer
|
r421 | /*! | |
|
r500 | \example examples/areachart | |
|
r421 | \title AreaChart Example | |
\subtitle | |||
The example shows how to create simple area chart. | |||
\image areachart.png | |||
To create area charts, we need two QLineSeries instances. They are going to define upper and lower boundary of the area. | |||
|
r496 | \snippet ../examples/areachart/main.cpp 1 | |
|
r421 | ||
We add data to both series, we use stream operator. | |||
|
r496 | \snippet ../examples/areachart/main.cpp 2 | |
|
r421 | ||
Now we create QAreaSeries instance using two line series objects. We set the custom gradient fill and width of the outline. | |||
|
r496 | \snippet ../examples/areachart/main.cpp 3 | |
|
r421 | ||
|
r422 | In the end we create QChartView instance, set title, set anti-aliasing and add area series. We also set the specific range for axes. | |
|
r421 | ||
|
r496 | \snippet ../examples/areachart/main.cpp 4 | |
|
r421 | ||
Chart is ready to be shown. | |||
|
r496 | \snippet ../examples/areachart/main.cpp 5 | |
|
r421 | ||
*/ |