examples-areachart.qdoc
29 lines
| 917 B
| text/plain
|
TextLexer
Michal Klocek
|
r421 | /*! | |
Tero Ahola
|
r500 | \example examples/areachart | |
Michal Klocek
|
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. | |||
sauimone
|
r496 | \snippet ../examples/areachart/main.cpp 1 | |
Michal Klocek
|
r421 | ||
We add data to both series, we use stream operator. | |||
sauimone
|
r496 | \snippet ../examples/areachart/main.cpp 2 | |
Michal Klocek
|
r421 | ||
Now we create QAreaSeries instance using two line series objects. We set the custom gradient fill and width of the outline. | |||
sauimone
|
r496 | \snippet ../examples/areachart/main.cpp 3 | |
Michal Klocek
|
r421 | ||
Michal Klocek
|
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. | |
Michal Klocek
|
r421 | ||
sauimone
|
r496 | \snippet ../examples/areachart/main.cpp 4 | |
Michal Klocek
|
r421 | ||
Chart is ready to be shown. | |||
sauimone
|
r496 | \snippet ../examples/areachart/main.cpp 5 | |
Michal Klocek
|
r421 | ||
*/ |