|
1 | NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -11,10 +11,6 | |||
|
11 | 11 | |
|
12 | 12 | \snippet ../examples/splinechart/main.cpp 1 |
|
13 | 13 | |
|
14 | Customize the look of the spline, by setting its pen's color and pen's width | |
|
15 | ||
|
16 | \snippet ../examples/splinechart/main.cpp 2 | |
|
17 | ||
|
18 | 14 | Now lets add some data points to the series. |
|
19 | 15 | |
|
20 | 16 | \snippet ../examples/splinechart/main.cpp 3 |
@@ -23,7 +19,7 The data series has been populated. To display it on a chart we create QChart ob | |||
|
23 | 19 | |
|
24 | 20 | \snippet ../examples/splinechart/main.cpp 4 |
|
25 | 21 | |
|
26 |
Then we create |
|
|
22 | 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. | |
|
27 | 23 | |
|
28 | 24 | \snippet ../examples/splinechart/main.cpp 5 |
|
29 | 25 |
@@ -7,20 +7,24 | |||
|
7 | 7 | |
|
8 | 8 | \image linechart.png |
|
9 | 9 | |
|
10 |
To create line chart |
|
|
10 | To create line chart, QLineSeries instance is needed. Let's create one. | |
|
11 | 11 | |
|
12 | 12 | \snippet ../examples/linechart/main.cpp 1 |
|
13 | 13 | |
|
14 |
|
|
|
14 | Then we add data to series. We can use add() member function or use stream operator. | |
|
15 | 15 | |
|
16 | 16 | \snippet ../examples/linechart/main.cpp 2 |
|
17 | 17 | |
|
18 | In the end we create QChartView instance, set title, set anti-aliasing and add both series. | |
|
18 | To present the data on the char we need QChart instance. We add the series to it and set the title of the chart. | |
|
19 | 19 | |
|
20 | 20 | \snippet ../examples/linechart/main.cpp 3 |
|
21 | ||
|
22 | Chart is ready to be shown. | |
|
21 | ||
|
22 | 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. | |
|
23 | 23 | |
|
24 | 24 | \snippet ../examples/linechart/main.cpp 4 |
|
25 | ||
|
26 | Chart is ready to be shown. | |
|
27 | ||
|
28 | \snippet ../examples/linechart/main.cpp 5 | |
|
25 | 29 | |
|
26 | */ No newline at end of file | |
|
30 | */ |
General Comments 0
You need to be logged in to leave comments.
Login now