##// END OF EJS Templates
clearWithAnimations() test case is skipped. Known issue. Won't be fixed for beta
clearWithAnimations() test case is skipped. Known issue. Won't be fixed for beta

File last commit:

r979:6c4321224538
r1413:48d5d53f1f4a
Show More
examples-linechart.qdoc
30 lines | 951 B | text/plain | TextLexer
/ doc / src / examples-linechart.qdoc
/*!
\example examples/linechart
\title LineChart Example
\subtitle
The example shows how to create simple line chart.
\image examples_linechart.png
To create line chart, QLineSeries instance is needed. Let's create one.
\snippet ../examples/linechart/main.cpp 1
Then we add data to series. We can use add() member function or use stream operator.
\snippet ../examples/linechart/main.cpp 2
To present the data on the char we need QChart instance. We add the series to it and set the title of the chart.
\snippet ../examples/linechart/main.cpp 3
Then we create a QChartView object with QChart as a parameter. This way we don't need to create QGraphicsView scene ourselves. We also set the Antialiasing on to have the rendered lines look nicer.
\snippet ../examples/linechart/main.cpp 4
Chart is ready to be shown.
\snippet ../examples/linechart/main.cpp 5
*/