@@ -13,18 +13,14 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
13 |
|
13 | |||
14 | \image linechart.png |
|
14 | \image linechart.png | |
15 |
|
15 | |||
16 | To create line charts, users need to first QLineSeries object. |
|
16 | Creating basic line chart is simple: | |
17 |
|
17 | \code | ||
18 | \snippet ../example/linechart/main.cpp 1 |
|
18 | QLineSeries* series = new QLineSeries(); | |
19 |
|
19 | series->add(0, 6); | ||
20 | Populate with the data |
|
20 | series->add(2, 4); | |
21 |
|
21 | ... | ||
22 | \snippet ../example/linechart/main.cpp 2 |
|
22 | chartView->addSeries(series); | |
23 |
|
23 | \endcode | ||
24 | Add created series objects to QChartView or QChart instance. |
|
|||
25 |
|
||||
26 | \snippet ../example/linechart/main.cpp 3 |
|
|||
27 |
|
||||
28 | */ |
|
24 | */ | |
29 |
|
25 | |||
30 | /*! |
|
26 | /*! |
General Comments 0
You need to be logged in to leave comments.
Login now