@@ -8,7 +8,8 | |||
|
8 | 8 | \image examples_barchart.png |
|
9 | 9 | |
|
10 | 10 | Data that barchart visualizes, is defined by QBarSet instances. Here we create some sets and append data |
|
11 |
we want to visualize to them. Note that |
|
|
11 | we want to visualize to them. Note that x positions are not in even intervals and this will be reflected in the chart. | |
|
12 | If x positions aren't defined, then the index of value is assumed to be x position. | |
|
12 | 13 | |
|
13 | 14 | \snippet ../examples/barchart/main.cpp 1 |
|
14 | 15 | |
@@ -17,6 +18,7 | |||
|
17 | 18 | \snippet ../examples/barchart/main.cpp 2 |
|
18 | 19 | |
|
19 | 20 | Next we create a chart and add the series to it. |
|
21 | We also set the title for chart | |
|
20 | 22 | |
|
21 | 23 | \snippet ../examples/barchart/main.cpp 3 |
|
22 | 24 |
@@ -6,23 +6,22 | |||
|
6 | 6 | The example shows how to create simple bar chart. GroupedBarChart shows the data in sets as separate bars, which are grouped in categories. |
|
7 | 7 | |
|
8 | 8 | \image examples_groupedbarchart.png |
|
9 | ||
|
10 | First we define categories. | |
|
9 | ||
|
10 | Data that groupedbarchart visualizes, is defined by QBarSet instances. Here we create the sets and append data | |
|
11 | to them. | |
|
11 | 12 | |
|
12 | 13 | \snippet ../examples/groupedbarchart/main.cpp 1 |
|
13 | 14 | |
|
14 | Data that groupedbarchart visualizes, is defined by QBarSet instances. Here we create some sets and append data | |
|
15 | we want to visualize to them. | |
|
15 | We create the series and append the sets to it. The grouped barseries groups the data from sets to categories. | |
|
16 | First value of each set are gropuped together at first category second value to second category and so on. | |
|
16 | 17 | |
|
17 | 18 | \snippet ../examples/groupedbarchart/main.cpp 2 |
|
18 | 19 | |
|
19 | To combine the sets and categories to a chart, we need to create QBarSeries instance. When creating | |
|
20 | the QBarSeries, the categories must be known. Sets can be added later. For example purposes the sets | |
|
21 | are added to series here. | |
|
20 | Then we create a chart and add the series to it. | |
|
22 | 21 | |
|
23 | 22 | \snippet ../examples/groupedbarchart/main.cpp 3 |
|
24 | 23 | |
|
25 | Then we create a chart and add the series to it. | |
|
24 | We define the categories here and add them to the x-axis. | |
|
26 | 25 | |
|
27 | 26 | \snippet ../examples/groupedbarchart/main.cpp 4 |
|
28 | 27 |
General Comments 0
You need to be logged in to leave comments.
Login now