##// END OF EJS Templates
documentation update
sauimone -
r1618:fab18ef35094
parent child
Show More
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -71,7 +71,6
71 <ul>
71 <ul>
72 <li><a href="qbarseries.html">QBarSeries</a></li>
72 <li><a href="qbarseries.html">QBarSeries</a></li>
73 <li><a href="qbarset.html">QBarSet</a></li>
73 <li><a href="qbarset.html">QBarSet</a></li>
74 <li><a href="qgroupedbarseries.html">QGroupedBarSeries</a></li>
75 <li><a href="qpercentbarseries.html">QPercentBarSeries</a></li>
74 <li><a href="qpercentbarseries.html">QPercentBarSeries</a></li>
76 <li><a href="qstackedbarseries.html">QStackedBarSeries</a></li>
75 <li><a href="qstackedbarseries.html">QStackedBarSeries</a></li>
77 <li><a href="qhbarmodelmapper.html">QHBarModelMapper</a></li>
76 <li><a href="qhbarmodelmapper.html">QHBarModelMapper</a></li>
@@ -3,34 +3,37
3 \title BarChart Example
3 \title BarChart Example
4 \subtitle
4 \subtitle
5
5
6 The example shows how to create simple bar chart. Barchart shows the data in sets as separate bars, which are drawn at the x-axis to the position defined by data.
6 The example shows how to create a bar chart. BarChart shows the data in sets as separate bars, which are in categories.
7
7
8 \image examples_barchart.png
8 \image examples_barchart.png
9
9
10 Data that barchart visualizes, is defined by QBarSet instances. Here we create some sets and append data
10 Data that barchart visualizes, is defined by QBarSet instances. Here we create the sets and append data
11 we want to visualize to them. Note that x positions are not in even intervals and this will be reflected in the chart.
11 to them.
12 If x positions aren't defined, then the index of value is assumed to be x position.
13
12
14 \snippet ../examples/barchart/main.cpp 1
13 \snippet ../examples/barchart/main.cpp 1
15
14
16 To combine the sets to a chart, we need to create QBarSeries instance. Then we append our barsets to the series.
15 We create the series and append the sets to it. The 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.
17
17
18 \snippet ../examples/barchart/main.cpp 2
18 \snippet ../examples/barchart/main.cpp 2
19
20 Next we create a chart and add the series to it.
21 We also set the title for chart
22
19
23 \snippet ../examples/barchart/main.cpp 3
20 Then we create a chart and add the series to it.
24
21
25 We want to have the legend displayed at the bottom of the chart. Also we turn on the nice numbers algorithm on for y-axis.
22 \snippet ../examples/barchart/main.cpp 3
23
24 We define the categories here and add them to QCategoriesAxis which we then set to be the x-axis of the chart.
26
25
27 \snippet ../examples/barchart/main.cpp 4
26 \snippet ../examples/barchart/main.cpp 4
28
27
29 Finally we add the chart onto a view.
28 And we also want to show the legend.
30
29
31 \snippet ../examples/barchart/main.cpp 5
30 \snippet ../examples/barchart/main.cpp 5
32
31
32 Finally we add the chart onto a view.
33
34 \snippet ../examples/barchart/main.cpp 6
35
33 And it is ready to be shown in a window.
36 And it is ready to be shown in a window.
34
37
35 \snippet ../examples/percentbarchart/main.cpp 6
38 \snippet ../examples/barchart/main.cpp 7
36 */
39 */
@@ -23,7 +23,7
23
23
24 \snippet ../examples/barmodelmapper/tablewidget.cpp 3
24 \snippet ../examples/barmodelmapper/tablewidget.cpp 3
25
25
26 First line of the code below creates new grouped bar series. Variables firstRow and rowCount are used to define a custom model mapping.
26 First line of the code below creates new bar series. Variables firstRow and rowCount are used to define a custom model mapping.
27 Custom mapping allows to take only part of the data from the model. In this case data from 5 rows starting with the row with the index 3.
27 Custom mapping allows to take only part of the data from the model. In this case data from 5 rows starting with the row with the index 3.
28 Following three lines create an instance of QVBarModelMapper class and specifie that data for the bar sets should be taken from the model's columns with indexes from 1 to 4(inclusive).
28 Following three lines create an instance of QVBarModelMapper class and specifie that data for the bar sets should be taken from the model's columns with indexes from 1 to 4(inclusive).
29 To create a connection between the series and the model we set both of those objects to QVBarModelMapper.
29 To create a connection between the series and the model we set both of those objects to QVBarModelMapper.
@@ -16,7 +16,6
16 <li><a href="examples-areachart.html">Area chart</a></li>
16 <li><a href="examples-areachart.html">Area chart</a></li>
17 <li><a href="examples-barchart.html">Bar chart</a></li>
17 <li><a href="examples-barchart.html">Bar chart</a></li>
18 <li><a href="examples-customchart.html">Custom chart</a></li>
18 <li><a href="examples-customchart.html">Custom chart</a></li>
19 <li><a href="examples-groupedbarchart.html">Grouped bar chart</a></li>
20 <li><a href="examples-legend.html">Legend</a></li>
19 <li><a href="examples-legend.html">Legend</a></li>
21 <li><a href="examples-linechart.html">Line chart</a></li>
20 <li><a href="examples-linechart.html">Line chart</a></li>
22 <li><a href="examples-modeldata.html">Model data</a></li>
21 <li><a href="examples-modeldata.html">Model data</a></li>
@@ -24,19 +24,18
24 <td><a href="examples-barchart.html"><img src="images/examples_barchart.png" width="440" alt="barchart" /></a></td>
24 <td><a href="examples-barchart.html"><img src="images/examples_barchart.png" width="440" alt="barchart" /></a></td>
25 </tr>
25 </tr>
26 <tr>
26 <tr>
27 <td><a href="examples-groupedbarchart.html"><img src="images/examples_groupedbarchart.png" width="440" alt="groupedbarcchart" /></a></td>
28 <td><a href="examples-stackedbarchart.html"><img src="images/examples_stackedbarchart.png" width="440" alt="stackedbarchart" /></a></td>
27 <td><a href="examples-stackedbarchart.html"><img src="images/examples_stackedbarchart.png" width="440" alt="stackedbarchart" /></a></td>
28 <td><a href="examples-percentbarchart.html"><img src="images/examples_percentbarchart.png" width="440" alt="percentbarcchart" /></a></td>
29 </tr>
29 </tr>
30 <tr>
30 <tr>
31 <td><a href="examples-percentbarchart.html"><img src="images/examples_percentbarchart.png" width="440" alt="percentbarcchart" /></a></td>
32 <td><a href="examples-splinechart.html"><img src="images/examples_splinechart.png" width="440" alt="linechart" /></a></td>
31 <td><a href="examples-splinechart.html"><img src="images/examples_splinechart.png" width="440" alt="linechart" /></a></td>
32 <td><a href="examples-customchart.html"><img src="images/examples_customchart.png" width="440" alt="customerchart" /></a></td>
33 </tr>
33 </tr>
34 <tr>
34 <tr>
35 <td><a href="examples-customchart.html"><img src="images/examples_customchart.png" width="440" alt="customerchart" /></a></td>
36 <td><a href="examples-piechart.html"><img src="images/examples_piechart.png" width="440" alt="piechart" /></a></td>
35 <td><a href="examples-piechart.html"><img src="images/examples_piechart.png" width="440" alt="piechart" /></a></td>
36 <td><a href="demos-chartthemes.html"><img src="images/demo_chartthemes_blue_cerulean.png" width=440 alt="charttheme" /></a></td>
37 </tr>
37 </tr>
38 <tr>
38 <tr>
39 <td><a href="demos-chartthemes.html"><img src="images/demo_chartthemes_blue_cerulean.png" width=440 alt="charttheme" /></a></td>
40 <td><a href="examples-zoomlinechart.html"><img src="images/examples_zoomlinechart2.png" width="440" alt="zoomlinechart" /></a></td>
39 <td><a href="examples-zoomlinechart.html"><img src="images/examples_zoomlinechart2.png" width="440" alt="zoomlinechart" /></a></td>
41 </tr>
40 </tr>
42 </table>
41 </table>
@@ -65,7 +65,6
65 <td valign="top">
65 <td valign="top">
66 <ul>
66 <ul>
67 <li><a href="qml-barseries.html">BarSeries</a></li>
67 <li><a href="qml-barseries.html">BarSeries</a></li>
68 <li><a href="qml-groupedbarseries.html">GroupedBarSeries</a></li>
69 <li><a href="qml-stackedbarseries.html">StackedBarSeries</a></li>
68 <li><a href="qml-stackedbarseries.html">StackedBarSeries</a></li>
70 <li><a href="qml-percentbarseries.html">PercentBarSeries</a></li>
69 <li><a href="qml-percentbarseries.html">PercentBarSeries</a></li>
71 <li><a href="qml-barset.html">BarSet</a></li>
70 <li><a href="qml-barset.html">BarSet</a></li>
@@ -59,6 +59,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
59
59
60 The type of the series object.
60 The type of the series object.
61
61
62 \value AxisTypeNoAxis
62 \value AxisTypeValues
63 \value AxisTypeValues
63 \value AxisTypeCategories
64 \value AxisTypeCategories
64 */
65 */
@@ -37,8 +37,8 QTCOMMERCIALCHART_BEGIN_NAMESPACE
37 as groups, where bars in same category are grouped next to each other. QBarSeries groups the data
37 as groups, where bars in same category are grouped next to each other. QBarSeries groups the data
38 from sets to categories, which are defined by a QStringList.
38 from sets to categories, which are defined by a QStringList.
39
39
40 See the \l {GroupedbarChart Example} {grouped bar chart example} to learn how to create a grouped bar chart.
40 See the \l {BarChart Example} {bar chart example} to learn how to create a grouped bar chart.
41 \image examples_groupedbarchart.png
41 \image examples_barchart.png
42
42
43 \sa QBarSet, QPercentBarSeries, QAbstractBarSeries, QStackedBarSeries
43 \sa QBarSet, QPercentBarSeries, QAbstractBarSeries, QStackedBarSeries
44 */
44 */
@@ -47,9 +47,9 QTCOMMERCIALCHART_BEGIN_NAMESPACE
47 \inherits AbstractBarSeries
47 \inherits AbstractBarSeries
48
48
49 The following QML shows how to create a simple grouped bar chart:
49 The following QML shows how to create a simple grouped bar chart:
50 \snippet ../demos/qmlchart/qml/qmlchart/View8.qml 1
50 \snippet ../demos/qmlchart/qml/qmlchart/View6.qml 1
51 \beginfloatleft
51 \beginfloatleft
52 \image demos_qmlchart7.png
52 \image demos_qmlchart6.png
53 \endfloat
53 \endfloat
54 \clearfloat
54 \clearfloat
55 */
55 */
@@ -47,9 +47,9 QTCOMMERCIALCHART_BEGIN_NAMESPACE
47 \inherits QAbstractBarSeries
47 \inherits QAbstractBarSeries
48
48
49 The following QML shows how to create a simple percent bar chart:
49 The following QML shows how to create a simple percent bar chart:
50 \snippet ../demos/qmlchart/qml/qmlchart/View9.qml 1
50 \snippet ../demos/qmlchart/qml/qmlchart/View8.qml 1
51 \beginfloatleft
51 \beginfloatleft
52 \image demos_qmlchart9.png
52 \image demos_qmlchart8.png
53 \endfloat
53 \endfloat
54 \clearfloat
54 \clearfloat
55 */
55 */
@@ -48,9 +48,9 QTCOMMERCIALCHART_BEGIN_NAMESPACE
48 \inherits AbstractBarSeries
48 \inherits AbstractBarSeries
49
49
50 The following QML shows how to create a simple stacked bar chart:
50 The following QML shows how to create a simple stacked bar chart:
51 \snippet ../demos/qmlchart/qml/qmlchart/View8.qml 1
51 \snippet ../demos/qmlchart/qml/qmlchart/View7.qml 1
52 \beginfloatleft
52 \beginfloatleft
53 \image demos_qmlchart8.png
53 \image demos_qmlchart7.png
54 \endfloat
54 \endfloat
55 \clearfloat
55 \clearfloat
56 */
56 */
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now