##// END OF EJS Templates
Fix documentation appearance...
Titta Heikkala -
r2750:0968736234d9
parent child
Show More
@@ -37,28 +37,22 QT_CHARTS_BEGIN_NAMESPACE
37 37 Unlike with the QBarCategoryAxis the QCategoryAxis allows the categories ranges widths to be specified freely.
38 38
39 39 Example code on how to use QCategoryAxis:
40 \table
41 \row
42 \li \br
43 \br
44 \code
45 QChartView *chartView = new QChartView;
46 QLineSeries *series = new QLineSeries;
47 // ...
48 chartView->chart()->addSeries(series);
49
50 QCategoryAxis *axisY = new QCategoryAxis;
51 axisY->setMin(0);
52 axisY->setMax(52);
53 axisY->setStartValue(15);
54 axisY->append("First", 20);
55 axisY->append("Second", 37);
56 axisY->append("Third", 52);
57 chartView->chart()->setAxisY(axisY, series);
58 \endcode
59 \li \br
60 \inlineimage api_category_axis.png
61 \endtable
40 \image api_category_axis.png
41 \code
42 QChartView *chartView = new QChartView;
43 QLineSeries *series = new QLineSeries;
44 // ...
45 chartView->chart()->addSeries(series);
46
47 QCategoryAxis *axisY = new QCategoryAxis;
48 axisY->setMin(0);
49 axisY->setMax(52);
50 axisY->setStartValue(15);
51 axisY->append("First", 20);
52 axisY->append("Second", 37);
53 axisY->append("Third", 52);
54 chartView->chart()->setAxisY(axisY, series);
55 \endcode
62 56 */
63 57 /*!
64 58 \qmltype CategoryAxis
@@ -69,14 +63,8 QT_CHARTS_BEGIN_NAMESPACE
69 63 \brief CategoryAxis allows putting a named ranges on the axis.
70 64
71 65 For example:
72 \table
73 \row
74 \li \br
75 \br
76 \br
77 \snippet qmlaxes/qml/qmlaxes/View3.qml 1
78 \li \inlineimage examples_qmlaxes3.png
79 \endtable
66 \image examples_qmlaxes3.png
67 \snippet qmlaxes/qml/qmlaxes/View3.qml 1
80 68 */
81 69
82 70 /*!
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example audio
21 \title Audio example
21 \title Audio Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This example shows the drawing of dynamic data (microphone input).
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example barmodelmapper
21 \title BarModelMapper example
21 \title BarModelMapper Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This example shows how to use QAbstractItemModel derived model as the data for the bar
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example callout
21 \title Callout example
21 \title Callout Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This example shows how to draw an additional element (a callout) on top of the chart.
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example chartthemes
21 \title Chart themes example
21 \title Chart Themes Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief The example shows the look and feel of the different built-in themes.
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example donutbreakdown
21 \title Donut chart breakdown example
21 \title Donut Chart Breakdown Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This example shows how to use create a donut breakdown chart using QPieSeries API.
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example dynamicspline
21 \title Dynamic spline example
21 \title Dynamic Spline Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This example shows how to draw dynamic data.
@@ -34,11 +34,8
34 34 alignment can be modified.
35 35 When the legend is detached, it can be resized and positioned freely.
36 36
37 \table
38 \row
39 \li \inlineimage examples_legend_detach.png
40 \li \inlineimage examples_legend_detach2.png
41 \endtable
37 \image examples_legend_detach.png
38 \image examples_legend_detach2.png
42 39
43 40 Here we turn the legend visible and set its alignment to the bottom of the chart.
44 41
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example nesteddonuts
21 \title Nested donuts example
21 \title Nested Donuts Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This example shows how to create a nested donuts chart using the QPieSeries API.
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example piechartcustomization
21 \title Pie chart customization example
21 \title Pie Chart Customization Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This example shows how the look and feel of a pie chart can be customized.
@@ -23,28 +23,19
23 23
24 24 \brief This is a demonstration of how to use axes in your QML application.
25 25
26 \table
27 \row
28 \li \br
29 We begin with a chart that has a line series and a scatter series with random
30 data. Both series use the same axes.
31 \br
32 \br
33 \snippet qmlaxes/qml/qmlaxes/View1.qml 1
34 \li \inlineimage examples_qmlaxes1.png
35 \row
36 \li \br
37 The next example shows a chart with some accurate historical data that makes us to use a DateTimeAxis.
38 \br
39 \br
40 \snippet qmlaxes/qml/qmlaxes/View2.qml 1
41 \li \inlineimage examples_qmlaxes2.png
42 \row
43 \li \br
44 And the final example with a chart that uses a CategoryAxis to make the data easier to understand.
45 \br
46 \br
47 \snippet qmlaxes/qml/qmlaxes/View3.qml 1
48 \li \inlineimage examples_qmlaxes3.png
49 \endtable
26 We begin with a chart that has a line series and a scatter series with random
27 data. Both series use the same axes.
28
29 \image examples_qmlaxes1.png
30 \snippet qmlaxes/qml/qmlaxes/View1.qml 1
31
32 The next example shows a chart with some accurate historical data that makes us to use a DateTimeAxis.
33
34 \image examples_qmlaxes2.png
35 \snippet qmlaxes/qml/qmlaxes/View2.qml 1
36
37 And the final example with a chart that uses a CategoryAxis to make the data easier to understand.
38
39 \image examples_qmlaxes3.png
40 \snippet qmlaxes/qml/qmlaxes/View3.qml 1
50 41 */
@@ -18,126 +18,65
18 18
19 19 /*!
20 20 \example qmlchart
21 \title Qml charts example
21 \title Qml Charts Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This basic demonstration shows how to use the different chart types by using qml.
25 25
26 26 Creating each chart type begins with the creation of a ChartView.
27 27
28 \table
29 \row
30 \li \br
31 To create a pie, we use the PieSeries API together with a few PieSlices:
32 \br
33 \br
34 \snippet qmlchart/qml/qmlchart/View1.qml 1
35 \li \inlineimage examples_qmlchart1.png
36 \endtable
37
38 \table
39 \row
40 \li \br
41 To create a chart with a line series:
42 \br
43 \br
44 \snippet qmlchart/qml/qmlchart/View2.qml 1
45 \li \inlineimage examples_qmlchart2.png
46 \endtable
47
48 \table
49 \row
50 \li \br
51 And spline series:
52 \br
53 \br
54 \snippet qmlchart/qml/qmlchart/View3.qml 1
55 \li \inlineimage examples_qmlchart3.png
56 \endtable
57
58 \table
59 \row
60 \li \br
61 Then we create a chart that illustrates the NHL All-Star player selections by using
62 three area series:
63 \br
64 \br
65 \snippet qmlchart/qml/qmlchart/View4.qml 1
66 \dots
67 \li \inlineimage examples_qmlchart4.png
68 \endtable
69
70 \table
71 \row
72 \li \br
73 Then a couple of scatter series:
74 \br
75 \br
76 \snippet qmlchart/qml/qmlchart/View5.qml 1
77 \dots
78 \li \inlineimage examples_qmlchart5.png
79 \endtable
28 To create a pie, we use the PieSeries API together with a few PieSlices:
29
30 \image examples_qmlchart1.png
31 \snippet qmlchart/qml/qmlchart/View1.qml 1
32
33 To create a chart with a line series:
34
35 \image examples_qmlchart2.png
36 \snippet qmlchart/qml/qmlchart/View2.qml 1
37
38 And spline series:
39
40 \image examples_qmlchart3.png
41 \snippet qmlchart/qml/qmlchart/View3.qml 1
42
43 Then we create a chart that illustrates the NHL All-Star player selections by using
44 three area series:
45
46 \image examples_qmlchart4.png
47 \snippet qmlchart/qml/qmlchart/View4.qml 1
48 \dots
49
50 Then a couple of scatter series:
51
52 \image examples_qmlchart5.png
53 \snippet qmlchart/qml/qmlchart/View5.qml 1
54 \dots
80 55
81 56 And a few different bar series:
82 \table
83 \row
84 \li \br
85 \br
86 \br
87 \snippet qmlchart/qml/qmlchart/View6.qml 1
88 \li \inlineimage examples_qmlchart6.png
89 \endtable
90 \table
91 \row
92 \li \br
93 \br
94 \br
95 \snippet qmlchart/qml/qmlchart/View7.qml 1
96 \li \inlineimage examples_qmlchart7.png
97 \endtable
98 \table
99 \row
100 \li \br
101 \br
102 \br
103 \snippet qmlchart/qml/qmlchart/View8.qml 1
104 \li \inlineimage examples_qmlchart8.png
105 \endtable
106 \table
107 \row
108 \li \br
109 \br
110 \br
111 \snippet qmlchart/qml/qmlchart/View9.qml 1
112 \li \inlineimage examples_qmlchart9.png
113 \endtable
114 \table
115 \row
116 \li \br
117 \br
118 \br
119 \snippet qmlchart/qml/qmlchart/View10.qml 1
120 \li \inlineimage examples_qmlchart10.png
121 \endtable
122 \table
123 \row
124 \li \br
125 \br
126 \br
127 \snippet qmlchart/qml/qmlchart/View11.qml 1
128 \li \inlineimage examples_qmlchart11.png
129 \endtable
130
131 \table
132 \row
133 \li \br
134 And finally an example demonstrating how to create a donut chart with two pie
135 series:
136 \br
137 \br
138 \snippet qmlchart/qml/qmlchart/View12.qml 1
139 \li \inlineimage examples_qmlchart12.png
140 \endtable
57
58 \image examples_qmlchart6.png
59 \snippet qmlchart/qml/qmlchart/View6.qml 1
60
61 \image examples_qmlchart7.png
62 \snippet qmlchart/qml/qmlchart/View7.qml 1
63
64 \image examples_qmlchart8.png
65 \snippet qmlchart/qml/qmlchart/View8.qml 1
66
67 \image examples_qmlchart9.png
68 \snippet qmlchart/qml/qmlchart/View9.qml 1
69
70 \image examples_qmlchart10.png
71 \snippet qmlchart/qml/qmlchart/View10.qml 1
72
73 \image examples_qmlchart11.png
74 \snippet qmlchart/qml/qmlchart/View11.qml 1
75
76 And finally an example demonstrating how to create a donut chart with two pie series:
77
78 \image examples_qmlchart12.png
79 \snippet qmlchart/qml/qmlchart/View12.qml 1
141 80
142 81 Additionally, antialiasing is set with the qml property in Qt Quick 2.
143 82 */
@@ -26,36 +26,24
26 26 This application shows you how to create your own custom legend instead of using the
27 27 built-in legend of ChartView API.
28 28
29 \table
30 \row
31 \li \br
32 The main view of the application shows a stacked area chart. This is how one of
33 \br
34 the stacked areas is created. See ChartViewStacked.qml and AnimatedAreaSeries.qml.
35 \br
36 \br
37 \snippet qmlcustomlegend/qml/qmlcustomlegend/ChartViewStacked.qml 1
38 \li \inlineimage examples_qmlcustomlegend1.png
39 \row
40 \li \br
41 Hovering with mouse on top of the legend will highlight the hovered series.
42 \br
43 (see CustomLegend.qml).
44 \br
45 \br
46 \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 1
47 \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 2
48 \dots
49 \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 3
50 \li \inlineimage examples_qmlcustomlegend2.png
51 \row
52 \li \br
53 You can also select one of the stacked areas for a closer look as a line series by
54 \br
55 a mouse click (see ChartViewHighlighted.qml).
56 \br
57 \br
58 \snippet qmlcustomlegend/qml/qmlcustomlegend/ChartViewHighlighted.qml 1
59 \li \inlineimage examples_qmlcustomlegend3.png
60 \endtable
29 The main view of the application shows a stacked area chart. This is how one of
30 the stacked areas is created. See ChartViewStacked.qml and AnimatedAreaSeries.qml.
31
32 \image examples_qmlcustomlegend1.png
33 \snippet qmlcustomlegend/qml/qmlcustomlegend/ChartViewStacked.qml 1
34
35 Hovering with mouse on top of the legend will highlight the hovered series.
36 (see CustomLegend.qml).
37
38 \image examples_qmlcustomlegend2.png
39 \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 1
40 \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 2
41 \dots
42 \snippet qmlcustomlegend/qml/qmlcustomlegend/CustomLegend.qml 3
43
44 You can also select one of the stacked areas for a closer look as a line series by
45 a mouse click (see ChartViewHighlighted.qml).
46
47 \image examples_qmlcustomlegend3.png
48 \snippet qmlcustomlegend/qml/qmlcustomlegend/ChartViewHighlighted.qml 1
61 49 */
@@ -23,31 +23,21
23 23
24 24 \brief This is a demonstration on how to use a polar chart in your QML application.
25 25
26 \table
27 \row
28 \li \br
29 We begin with a chart that has a spline series and a scatter series with random
30 data. Both series use the same axes.
31 \br
32 \br
33 \snippet qmlpolarchart/qml/qmlpolarchart/View1.qml 1
34 \li \inlineimage examples_qmlpolarchart1.png
35 \row
36 \li \br
37 The next example shows a chart with some accurate historical data for which we need
38 to use a DateTimeAxis
39 and a AreaSeries.
40 \br
41 \br
42 \snippet qmlpolarchart/qml/qmlpolarchart/View2.qml 1
43 \li \inlineimage examples_qmlpolarchart2.png
44 \row
45 \li \br
46 And the final example with a chart that uses a CategoryAxis to make the data easier
47 to understand.
48 \br
49 \br
50 \snippet qmlpolarchart/qml/qmlpolarchart/View3.qml 1
51 \li \inlineimage examples_qmlpolarchart3.png
52 \endtable
26 We begin with a chart that has a spline series and a scatter series with random
27 data. Both series use the same axes.
28
29 \image examples_qmlpolarchart1.png
30 \snippet qmlpolarchart/qml/qmlpolarchart/View1.qml 1
31
32 The next example shows a chart with some accurate historical data for which we need
33 to use a DateTimeAxis and a AreaSeries.
34
35 \image examples_qmlpolarchart2.png
36 \snippet qmlpolarchart/qml/qmlpolarchart/View2.qml 1
37
38 And the final example with a chart that uses a CategoryAxis to make the data easier
39 to understand.
40
41 \image examples_qmlpolarchart3.png
42 \snippet qmlpolarchart/qml/qmlpolarchart/View3.qml 1
53 43 */
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example scatterinteractions
21 \title ScatterInteractions Example
21 \title Scatter Interactions Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief This example shows how to create a simple scatter chart and how to interact with the
@@ -18,7 +18,7
18 18
19 19 /*!
20 20 \example temperaturerecords
21 \title Temperature records example
21 \title Temperature Records Example
22 22 \ingroup qtcharts_examples
23 23
24 24 \brief The example shows how to create a bar chart with negative bars.
@@ -21,8 +21,7
21 21 \page index.html
22 22 \keyword About
23 23
24 Qt Charts is a part of the Qt Enterprise addons package. It provides a set of easy to use chart
25 components which are available for Qt customers. It uses the Qt Graphics View
24 Qt Charts module provides a set of easy to use chart components. It uses the Qt Graphics View
26 25 Framework, therefore charts can be easily integrated to modern user interfaces. Qt Charts can
27 26 be used as QWidgets, QGraphicsWidget, or QML types. Users can easily create impressive
28 27 graphs by selecting one of the charts themes.
@@ -48,17 +48,11
48 48 The Qt Charts QML API is an intuitive and simple way to show charts in your QML
49 49 applications.
50 50
51 \table
52 \row
53 \li \br
54 Use the following QML to create a simple pie chart:
55 \br
56 \br
57 \snippet qmlpiechart/qml/qmlpiechart/main.qml 1
58 \snippet qmlpiechart/qml/qmlpiechart/main.qml 2
59 \snippet qmlpiechart/qml/qmlpiechart/main.qml 3
60 \li \inlineimage examples_qmlpiechart.png
61 \endtable
51 Use the following QML to create a simple pie chart:
52 \image examples_qmlpiechart.png
53 \snippet qmlpiechart/qml/qmlpiechart/main.qml 1
54 \snippet qmlpiechart/qml/qmlpiechart/main.qml 2
55 \snippet qmlpiechart/qml/qmlpiechart/main.qml 3
62 56
63 57 \note Since Qt Creator 3.0 the project created with Qt Quick Application wizard based on
64 58 Qt Quick 2 template uses QGuiApplication by default. As Qt Charts utilizes Qt Graphics View
@@ -48,11 +48,8 QT_CHARTS_BEGIN_NAMESPACE
48 48 Full pie is 360 degrees where 0 is at 12 a'clock.
49 49
50 50 See the \l {PieChart Example} {pie chart example} or \l {DonutChart Example} {donut chart example} to learn how to use QPieSeries.
51 \table 100%
52 \row
53 \li \image examples_piechart.png
54 \li \image examples_donutchart.png
55 \endtable
51 \image examples_piechart.png
52 \image examples_donutchart.png
56 53 */
57 54 /*!
58 55 \qmltype PieSeries
General Comments 0
You need to be logged in to leave comments. Login now