@@ -15,7 +15,7 | |||
|
15 | 15 | \snippet ../examples/barchart/main.cpp 1 |
|
16 | 16 | |
|
17 | 17 | We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. |
|
18 |
|
|
|
18 | First values of each set are grouped together at first category second value to second category and so on. | |
|
19 | 19 | |
|
20 | 20 | \snippet ../examples/barchart/main.cpp 2 |
|
21 | 21 | |
@@ -31,7 +31,7 | |||
|
31 | 31 | |
|
32 | 32 | \snippet ../examples/barchart/main.cpp 4 |
|
33 | 33 | |
|
34 |
We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting it |
|
|
34 | We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment | |
|
35 | 35 | to Qt::AlignBottom. |
|
36 | 36 | |
|
37 | 37 | \snippet ../examples/barchart/main.cpp 5 |
@@ -32,8 +32,8 | |||
|
32 | 32 | |
|
33 | 33 | \snippet ../examples/barmodelmapper/tablewidget.cpp 4 |
|
34 | 34 | |
|
35 | To show in QTableView which data coresponds with which bar set this example uses table coloring. | |
|
36 |
When series is added to the chart it is assigned a color b |
|
|
35 | To show in QTableView which data corresponds with which bar set this example uses table coloring. | |
|
36 | When series is added to the chart it is assigned a color based on the currently selected theme. | |
|
37 | 37 | Code below extracts that color from the series and uses it to create colored QTableView. |
|
38 | 38 | Coloring of the view is not a part of the QChart functionality. |
|
39 | 39 |
@@ -16,13 +16,13 | |||
|
16 | 16 | |
|
17 | 17 | \snippet ../examples/datetimeaxis/main.cpp 2 |
|
18 | 18 | |
|
19 | To present the data on the char we need QChart instance. We add the series to it, hide the legend, create the default axes and set the title of the chart. | |
|
19 | To present the data on the chart we need QChart instance. We add the series to it, hide the legend, create the default axes and set the title of the chart. | |
|
20 | 20 | |
|
21 | 21 | \snippet ../examples/datetimeaxis/main.cpp 3 |
|
22 | 22 | |
|
23 |
Beca |
|
|
24 | First the instance of QDateTimeAxis is created, then the number of ticks that are to be shown is set. The number of sun spots is provided as an average for the month therfore we don't need the axis labels to contain the information about the time and the day. This is achived by setting a custom label format. | |
|
25 | Please refer to QDateTime::toString() method documntation to learn about the avaiable format options. | |
|
23 | Because we use QLineSeries calling createDefaultAxes will create QValueAxis both as X and Y axis. To use QDateTimeAxis we need to set it manually to the chart. | |
|
24 | First the instance of QDateTimeAxis is created, then the number of ticks that are to be shown is set. The number of sun spots is provided as an average for the month therefore we don't need the axis labels to contain the information about the time and the day. This is achieved by setting a custom label format. | |
|
25 | Please refer to QDateTime::toString() method documentation to learn about the available format options. | |
|
26 | 26 | |
|
27 | 27 | \snippet ../examples/datetimeaxis/main.cpp 4 |
|
28 | 28 |
@@ -32,7 +32,7 | |||
|
32 | 32 | |
|
33 | 33 | \snippet ../examples/horizontalbarchart/main.cpp 4 |
|
34 | 34 | |
|
35 |
We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting it |
|
|
35 | We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment | |
|
36 | 36 | to Qt::AlignBottom. |
|
37 | 37 | |
|
38 | 38 | \snippet ../examples/horizontalbarchart/main.cpp 5 |
@@ -21,7 +21,7 | |||
|
21 | 21 | \snippet ../examples/horizontalpercentbarchart/main.cpp 1 |
|
22 | 22 | |
|
23 | 23 | We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. |
|
24 |
|
|
|
24 | First values of each set are grouped together at first category second value to second category and so on. | |
|
25 | 25 | |
|
26 | 26 | \snippet ../examples/horizontalpercentbarchart/main.cpp 2 |
|
27 | 27 | |
@@ -37,7 +37,7 | |||
|
37 | 37 | |
|
38 | 38 | \snippet ../examples/horizontalpercentbarchart/main.cpp 4 |
|
39 | 39 | |
|
40 |
We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting it |
|
|
40 | We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment | |
|
41 | 41 | to Qt::AlignBottom. |
|
42 | 42 | |
|
43 | 43 | \snippet ../examples/horizontalpercentbarchart/main.cpp 5 |
@@ -18,7 +18,7 | |||
|
18 | 18 | \snippet ../examples/horizontalstackedbarchart/main.cpp 1 |
|
19 | 19 | |
|
20 | 20 | We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. |
|
21 |
|
|
|
21 | First values of each set are grouped together at first category second value to second category and so on. | |
|
22 | 22 | |
|
23 | 23 | \snippet ../examples/horizontalstackedbarchart/main.cpp 2 |
|
24 | 24 | |
@@ -34,7 +34,7 | |||
|
34 | 34 | |
|
35 | 35 | \snippet ../examples/horizontalstackedbarchart/main.cpp 4 |
|
36 | 36 | |
|
37 |
We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting it |
|
|
37 | We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment | |
|
38 | 38 | to Qt::AlignBottom. |
|
39 | 39 | |
|
40 | 40 | \snippet ../examples/horizontalstackedbarchart/main.cpp 5 |
@@ -13,7 +13,7 | |||
|
13 | 13 | \snippet ../examples/lineandbar/main.cpp 1 |
|
14 | 14 | |
|
15 | 15 | We create the barseries and append the sets to it. |
|
16 |
|
|
|
16 | First values of each set are grouped together at first category second value to second category and so on. | |
|
17 | 17 | |
|
18 | 18 | \snippet ../examples/lineandbar/main.cpp 2 |
|
19 | 19 |
@@ -15,7 +15,7 | |||
|
15 | 15 | |
|
16 | 16 | \snippet ../examples/linechart/main.cpp 2 |
|
17 | 17 | |
|
18 | To present the data on the char we need QChart instance. We add the series to it, create the default axes and set the title of the chart. | |
|
18 | To present the data on the chart we need QChart instance. We add the series to it, create the default axes and set the title of the chart. | |
|
19 | 19 | |
|
20 | 20 | \snippet ../examples/linechart/main.cpp 3 |
|
21 | 21 |
@@ -11,7 +11,7 | |||
|
11 | 11 | |
|
12 | 12 | \snippet ../examples/logvalueaxis/main.cpp 1 |
|
13 | 13 | |
|
14 | To present the data on the char we need QChart instance. Add the series to it, hide the legend and set the title of the chart. | |
|
14 | To present the data on the chart we need QChart instance. Add the series to it, hide the legend and set the title of the chart. | |
|
15 | 15 | |
|
16 | 16 | \snippet ../examples/logvalueaxis/main.cpp 2 |
|
17 | 17 |
@@ -31,7 +31,7 | |||
|
31 | 31 | |
|
32 | 32 | \snippet ../examples/modeldata/tablewidget.cpp 4 |
|
33 | 33 | |
|
34 | To show in QTableView which data coresponds with which series this example uses table coloring. | |
|
34 | To show in QTableView which data corresponds with which series this example uses table coloring. | |
|
35 | 35 | When series is added to the chart it is assigned a color based on the currently selected theme. |
|
36 | 36 | Code below extracts that color from the series and uses it to create colored QTableView. |
|
37 | 37 | Coloring of the view is not a part of the QChart functionality. |
@@ -21,7 +21,7 | |||
|
21 | 21 | \snippet ../examples/percentbarchart/main.cpp 1 |
|
22 | 22 | |
|
23 | 23 | We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. |
|
24 |
|
|
|
24 | First values of each set are grouped together at first category second value to second category and so on. | |
|
25 | 25 | |
|
26 | 26 | \snippet ../examples/percentbarchart/main.cpp 2 |
|
27 | 27 | |
@@ -37,7 +37,7 | |||
|
37 | 37 | |
|
38 | 38 | \snippet ../examples/percentbarchart/main.cpp 4 |
|
39 | 39 | |
|
40 |
We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting it |
|
|
40 | We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment | |
|
41 | 41 | to Qt::AlignBottom. |
|
42 | 42 | |
|
43 | 43 | \snippet ../examples/percentbarchart/main.cpp 5 |
@@ -20,7 +20,7 | |||
|
20 | 20 | \snippet ../examples/stackedbarchart/main.cpp 1 |
|
21 | 21 | |
|
22 | 22 | We create the series and append the barsets to it. The series takes ownership of the barsets. The series groups the data from sets to categories. |
|
23 |
|
|
|
23 | First values of each set are grouped together at first category second value to second category and so on. | |
|
24 | 24 | |
|
25 | 25 | \snippet ../examples/stackedbarchart/main.cpp 2 |
|
26 | 26 | |
@@ -36,7 +36,7 | |||
|
36 | 36 | |
|
37 | 37 | \snippet ../examples/stackedbarchart/main.cpp 4 |
|
38 | 38 | |
|
39 |
We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting it |
|
|
39 | We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment | |
|
40 | 40 | to Qt::AlignBottom. |
|
41 | 41 | |
|
42 | 42 | \snippet ../examples/stackedbarchart/main.cpp 5 |
@@ -28,7 +28,7 | |||
|
28 | 28 | |
|
29 | 29 | \snippet ../examples/temperaturerecords/main.cpp 4 |
|
30 | 30 | |
|
31 |
We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting it |
|
|
31 | We also want to show the legend. To do that, we get the legend pointer from chart and set it to visible. We also place the legend to bottom of the chart by setting its alignment | |
|
32 | 32 | to Qt::AlignBottom. |
|
33 | 33 | |
|
34 | 34 | \snippet ../examples/temperaturerecords/main.cpp 5 |
@@ -555,7 +555,7 void QChart::removeAxis(QAbstractAxis *axis) | |||
|
555 | 555 | } |
|
556 | 556 | |
|
557 | 557 | /*! |
|
558 | Returns the value in the \a series domain that coresponds to the charts widget point defines by \a position. | |
|
558 | Returns the value in the \a series domain that corresponds to the charts widget point defines by \a position. | |
|
559 | 559 | */ |
|
560 | 560 | QPointF QChart::mapToValue(const QPointF &position, QAbstractSeries *series) |
|
561 | 561 | { |
@@ -563,7 +563,7 QPointF QChart::mapToValue(const QPointF &position, QAbstractSeries *series) | |||
|
563 | 563 | } |
|
564 | 564 | |
|
565 | 565 | /*! |
|
566 | Returns the position on the charts widget that coresponds to the \a value in the \a series domain. | |
|
566 | Returns the position on the charts widget that corresponds to the \a value in the \a series domain. | |
|
567 | 567 | */ |
|
568 | 568 | QPointF QChart::mapToPosition(const QPointF &value, QAbstractSeries *series) |
|
569 | 569 | { |
General Comments 0
You need to be logged in to leave comments.
Login now