##// END OF EJS Templates
Some docs fixes
Marek Rosa -
r1630:59aae3a9af82
parent child
Show More
@@ -1,86 +1,87
1 1 /*!
2 2 \page classes.html
3 3 \title QtCommercial Charts API
4 4 \keyword All Classes
5 5
6 6 Charts API is build on top of Qt Graphics View Framework. Charts can be displayed as QGraphicsWidget using QChart class. However
7 7 there is also convenience class QChartView which is QWidget based. These lets quickly use QCharts as normal Qt widget.
8 8
9 9 Each chart type is represented by QAbstractSeries derived class. To create given chart type users have to use instance of related series class and add it to QChart instance.
10 10 \code
11 11 QLineSeries* series = new QLineSeries();
12 12 series->add(0, 6);
13 13 series->add(2, 4);
14 14 ...
15 15 chartView->chart()->addSeries(series);
16 chartView->chart()->createDefaultAxes();
16 17 \endcode
17 18
18 19 \raw HTML
19 20 <table cellpadding="2" cellspacing="1" border="0" width="100%" class="indextable">
20 21 <tr>
21 22 <th class="titleheader" width="25%">
22 23 Common and global
23 24 </th>
24 25 <th class="titleheader" width="25%">
25 26 XY chart
26 27 </th>
27 28 </tr>
28 29 <tr>
29 30 <td valign="top">
30 31 <ul>
31 32 <li><a href="qchart.html">QChart</a></li>
33 <li><a href="qchartview.html">QChartView</a></li>
32 34 <li><a href="qabstractaxis.html">QAbstractAxis</a></li>
33 35 <li><a href="qvaluesaxis.html">QValuesAxis</a></li>
34 36 <li><a href="qbarcategoriesaxis.html">QBarCategoriesAxis</a></li>
35 <li><a href="qintervalaxis.html">QIntervalAxis</a></li>
36 <li><a href="qchartview.html">QChartView</a></li>
37 <li><a href="qintervalaxis.html">QIntervalAxis</a></li>
37 38 <li><a href="qlegend.html">QLegend</a></li>
38 39 <li><a href="qabstractseries.html">QAbstractSeries</a></li>
39 40 <li><a href="qchartglobal.html">QChartGlobal</a></li>
40 41 </ul>
41 42 </td>
42 43 <td valign="top">
43 44 <ul>
44 45 <li><a href="qxyseries.html">QXYSeries</a></li>
45 46 <li><a href="qlineseries.html">QLineSeries</a></li>
46 47 <li><a href="qareaseries.html">QAreaSeries</a></li>
47 48 <li><a href="qscatterseries.html">QScatterSeries</a></li>
48 49 <li><a href="qsplineseries.html">QSplineSeries</a></li>
49 50 <li><a href="qhxymodelmapper.html">QHXYModelMapper</a></li>
50 51 <li><a href="qvxymodelmapper.html">QVXYModelMapper</a></li>
51 52 </ul>
52 53 </td>
53 54 </tr>
54 55 </table>
55 56 <table cellpadding="2" cellspacing="1" border="0" width="100%" class="indextable">
56 57 <tr>
57 58 <th class="titleheader" width="25%">
58 59 Pie chart
59 60 </th>
60 61 <th class="titleheader" width="25%">
61 62 Bar chart
62 63 </th>
63 64 <tr>
64 65 <td valign="top">
65 66 <ul>
66 67 <li><a href="qpieseries.html">QPieSeries</a></li>
67 68 <li><a href="qpieslice.html">QPieSlice</a></li>
68 69 <li><a href="qhpiemodelmapper.html">QHPieModelMapper</a></li>
69 70 <li><a href="qvpiemodelmapper.html">QVPieModelMapper</a></li>
70 71 </ul>
71 72 </td>
72 73 <td valign="top">
73 74 <ul>
74 75 <li><a href="qbarseries.html">QBarSeries</a></li>
75 76 <li><a href="qbarset.html">QBarSet</a></li>
76 77 <li><a href="qpercentbarseries.html">QPercentBarSeries</a></li>
77 78 <li><a href="qstackedbarseries.html">QStackedBarSeries</a></li>
78 79 <li><a href="qhbarmodelmapper.html">QHBarModelMapper</a></li>
79 80 <li><a href="qvbarmodelmapper.html">QVBarModelMapper</a></li>
80 81 </ul>
81 82 </td>
82 83 </tr>
83 84 </table>
84 85 \endraw
85 86
86 87 */
@@ -1,30 +1,30
1 1 /*!
2 2 \example examples/areachart
3 3 \title AreaChart Example
4 4 \subtitle
5 5
6 6 The example shows how to create simple area chart.
7 7
8 8 \image examples_areachart.png
9 9
10 10 To create area charts, we need two QLineSeries instances. They are going to define upper and lower boundary of the area.
11 11
12 12 \snippet ../examples/areachart/main.cpp 1
13 13
14 14 We add data to both series, we use stream operator.
15 15
16 16 \snippet ../examples/areachart/main.cpp 2
17 17
18 18 Now we create QAreaSeries instance using two line series objects. We set the custom gradient fill and width of the outline.
19 19
20 20 \snippet ../examples/areachart/main.cpp 3
21 21
22 In the end we create QChartView instance, set title, set anti-aliasing and add area series. We also set the specific range for axes.
22 In the end we create QChartView instance, set title, set anti-aliasing and add area series. We also create the default axes and specify the ranges on them.
23 23
24 24 \snippet ../examples/areachart/main.cpp 4
25 25
26 26 Chart is ready to be shown.
27 27
28 28 \snippet ../examples/areachart/main.cpp 5
29 29
30 30 */
@@ -1,30 +1,30
1 1 /*!
2 2 \example examples/linechart
3 3 \title LineChart Example
4 4 \subtitle
5 5
6 6 The example shows how to create simple line chart.
7 7
8 8 \image examples_linechart.png
9 9
10 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 To present the data on the char we need QChart instance. We add the series to it and set the title of the chart.
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.
19 19
20 20 \snippet ../examples/linechart/main.cpp 3
21 21
22 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 25
26 26 Chart is ready to be shown.
27 27
28 28 \snippet ../examples/linechart/main.cpp 5
29 29
30 30 */
General Comments 0
You need to be logged in to leave comments. Login now