examples-scatterchart.qdoc
26 lines
| 803 B
| text/plain
|
TextLexer
Michal Klocek
|
r471 | /*! | ||
Tero Ahola
|
r500 | \example examples/scatterchart | ||
Michal Klocek
|
r471 | \title ScatterChart Example | ||
\subtitle | ||||
The example shows how to create simple scatter chart. | ||||
Tero Ahola
|
r979 | \image examples_scatterchart.png | ||
Michal Klocek
|
r471 | |||
To create scatter charts, QScatterSeries instance is needed. Here we create scatter series instance and we set the type, color and width of outline for scatter points. | ||||
sauimone
|
r496 | \snippet ../examples/scatterchart/main.cpp 1 | ||
Michal Klocek
|
r471 | |||
We add data to be shown. We can use add() member function or use stream operator. | ||||
sauimone
|
r496 | \snippet ../examples/scatterchart/main.cpp 2 | ||
Michal Klocek
|
r471 | |||
In the end we create QChartView instance, set title, set anti-aliasing and add scatter series. | ||||
sauimone
|
r496 | \snippet ../examples/scatterchart/main.cpp 3 | ||
Michal Klocek
|
r471 | |||
Chart is ready to be shown. | ||||
sauimone
|
r496 | \snippet ../examples/scatterchart/main.cpp 4 | ||
Michal Klocek
|
r471 | |||
Tero Ahola
|
r979 | */ | ||