@@ -1,8 +1,8 | |||||
1 | /*! |
|
1 | /*! | |
2 | \example demos/audio |
|
2 | \example demos/audio | |
3 | \title Audio demo |
|
3 | \title Audio demo | |
4 | \subtitle |
|
4 | \subtitle | |
5 |
|
5 | |||
6 | This demos shows drawing of the dynamic data (microphon input) |
|
6 | This demos shows drawing of the dynamic data (microphone input) | |
7 | \image demos_audio.png |
|
7 | \image demos_audio.png | |
8 | */ |
|
8 | */ |
@@ -1,32 +1,32 | |||||
1 | /*! |
|
1 | /*! | |
2 | \example demos/qmlaxes |
|
2 | \example demos/qmlaxes | |
3 | \title Qml Axes |
|
3 | \title Qml Axes | |
4 | \subtitle |
|
4 | \subtitle | |
5 |
|
5 | |||
6 | This is a demonstration of how to use axes in your QML application. |
|
6 | This is a demonstration of how to use axes in your QML application. | |
7 |
|
7 | |||
8 | \table |
|
8 | \table | |
9 | \row |
|
9 | \row | |
10 | \o \br |
|
10 | \o \br | |
11 | We begin with a chart that has a line series and a scatter series with random |
|
11 | We begin with a chart that has a line series and a scatter series with random | |
12 |
data. Both series |
|
12 | data. Both series use the same axes. | |
13 | \br |
|
13 | \br | |
14 | \br |
|
14 | \br | |
15 | \snippet ../demos/qmlaxes/qml/qmlaxes/View1.qml 1 |
|
15 | \snippet ../demos/qmlaxes/qml/qmlaxes/View1.qml 1 | |
16 | \o \inlineimage demos_qmlaxes1.png |
|
16 | \o \inlineimage demos_qmlaxes1.png | |
17 | \row |
|
17 | \row | |
18 | \o \br |
|
18 | \o \br | |
19 | The next example shows a chart with some accurate historical data that makes us to use a DateTimeAxis. |
|
19 | The next example shows a chart with some accurate historical data that makes us to use a DateTimeAxis. | |
20 | \br |
|
20 | \br | |
21 | \br |
|
21 | \br | |
22 | \snippet ../demos/qmlaxes/qml/qmlaxes/View2.qml 1 |
|
22 | \snippet ../demos/qmlaxes/qml/qmlaxes/View2.qml 1 | |
23 | \o \inlineimage demos_qmlaxes2.png |
|
23 | \o \inlineimage demos_qmlaxes2.png | |
24 | \row |
|
24 | \row | |
25 | \o \br |
|
25 | \o \br | |
26 | And the final example with a chart that uses a CategoryAxis to make the data easier to understand. |
|
26 | And the final example with a chart that uses a CategoryAxis to make the data easier to understand. | |
27 | \br |
|
27 | \br | |
28 | \br |
|
28 | \br | |
29 | \snippet ../demos/qmlaxes/qml/qmlaxes/View3.qml 1 |
|
29 | \snippet ../demos/qmlaxes/qml/qmlaxes/View3.qml 1 | |
30 | \o \inlineimage demos_qmlaxes3.png |
|
30 | \o \inlineimage demos_qmlaxes3.png | |
31 | \endtable |
|
31 | \endtable | |
32 | */ |
|
32 | */ |
@@ -1,41 +1,41 | |||||
1 | /*! |
|
1 | /*! | |
2 | \example examples/legendmarkers |
|
2 | \example examples/legendmarkers | |
3 | \title LegendMarkers Example |
|
3 | \title LegendMarkers Example | |
4 | \subtitle |
|
4 | \subtitle | |
5 |
|
5 | |||
6 | The example shows how to make use of legend markers. In this example we create an application which uses QLegendMarker clicked signal to show/hide corresponding series |
|
6 | The example shows how to make use of legend markers. In this example we create an application which uses QLegendMarker clicked signal to show/hide corresponding series | |
7 | in chart. The connect marker button connects clicked signal from all markers in legend to handleMarkerClicked slot. |
|
7 | in chart. The connect marker button connects clicked signal from all markers in legend to handleMarkerClicked slot. | |
8 |
|
8 | |||
9 | \image examples_legendmarkers.png |
|
9 | \image examples_legendmarkers.png | |
10 |
|
10 | |||
11 | Our application has buttons for adding or removing series in chart and button to connect or disconnect legend markers clicked signal to our handler. In the image above, |
|
11 | Our application has buttons for adding or removing series in chart and button to connect or disconnect legend markers clicked signal to our handler. In the image above, | |
12 | we have connected the markers and clicked on one of them. |
|
12 | we have connected the markers and clicked on one of them. | |
13 |
|
13 | |||
14 | \snippet ../examples/legendmarkers/mainwidget.cpp 1 |
|
14 | \snippet ../examples/legendmarkers/mainwidget.cpp 1 | |
15 |
|
15 | |||
16 |
Here we connect the markers in legend to our handler. To avoid conn |
|
16 | Here we connect the markers in legend to our handler. To avoid connecting same marker more than once, we first disconnect it. | |
17 |
|
17 | |||
18 | \snippet ../examples/legendmarkers/mainwidget.cpp 2 |
|
18 | \snippet ../examples/legendmarkers/mainwidget.cpp 2 | |
19 |
|
19 | |||
20 | Here we disconnect all markers from our handler. |
|
20 | Here we disconnect all markers from our handler. | |
21 |
|
21 | |||
22 | \snippet ../examples/legendmarkers/mainwidget.cpp 3 |
|
22 | \snippet ../examples/legendmarkers/mainwidget.cpp 3 | |
23 |
|
23 | |||
24 | In our handler we first cast the sender of event to QLegendMarker. |
|
24 | In our handler we first cast the sender of event to QLegendMarker. | |
25 |
|
25 | |||
26 | \snippet ../examples/legendmarkers/mainwidget.cpp 4 |
|
26 | \snippet ../examples/legendmarkers/mainwidget.cpp 4 | |
27 |
|
27 | |||
28 | Then we check the type of marker. This is needed if we want to access the detailed methods of the marker and cast it to correct type. |
|
28 | Then we check the type of marker. This is needed if we want to access the detailed methods of the marker and cast it to correct type. | |
29 | If all we need is the pointer to QAbstractSeries, the casting isn't necessary. In case of pie or bar series, we may need the pointer to related QPieSlice or QBarSet. |
|
29 | If all we need is the pointer to QAbstractSeries, the casting isn't necessary. In case of pie or bar series, we may need the pointer to related QPieSlice or QBarSet. | |
30 |
|
30 | |||
31 | \snippet ../examples/legendmarkers/mainwidget.cpp 5 |
|
31 | \snippet ../examples/legendmarkers/mainwidget.cpp 5 | |
32 |
|
32 | |||
33 | We want to toggle the visibility of the series, when marker is clicked. To do so, we get the pointer to related series from marker and toggle its visibility. |
|
33 | We want to toggle the visibility of the series, when marker is clicked. To do so, we get the pointer to related series from marker and toggle its visibility. | |
34 | Because the legend marker follows the visibility of the series by default, we also set the marked back to visible. If we don't do that, the marker will be |
|
34 | Because the legend marker follows the visibility of the series by default, we also set the marked back to visible. If we don't do that, the marker will be | |
35 | invisible in legend and we can't click on it anymore. |
|
35 | invisible in legend and we can't click on it anymore. | |
36 |
|
36 | |||
37 | \snippet ../examples/legendmarkers/mainwidget.cpp 6 |
|
37 | \snippet ../examples/legendmarkers/mainwidget.cpp 6 | |
38 |
|
38 | |||
39 | Instead of making marker invisible when series is hidden, we dim the color of the marker. Here we do it by modifying the color of the laberBrush. |
|
39 | Instead of making marker invisible when series is hidden, we dim the color of the marker. Here we do it by modifying the color of the laberBrush. | |
40 |
|
40 | |||
41 | */ |
|
41 | */ |
@@ -1,36 +1,36 | |||||
1 | /*! |
|
1 | /*! | |
2 | \example examples/multiaxis |
|
2 | \example examples/multiaxis | |
3 | \title Multiple axes example |
|
3 | \title Multiple axes example | |
4 | \subtitle |
|
4 | \subtitle | |
5 |
|
5 | |||
6 | The example shows how to create simple chart with two vertical axes. One for each series. |
|
6 | The example shows how to create simple chart with two vertical axes. One for each series. | |
7 |
|
7 | |||
8 | \image examples_multiaxis.png |
|
8 | \image examples_multiaxis.png | |
9 |
|
9 | |||
10 | Create QChart instance, hide the legend of the chart and set its title. |
|
10 | Create QChart instance, hide the legend of the chart and set its title. | |
11 |
|
11 | |||
12 | \snippet ../examples/multiaxis/main.cpp 1 |
|
12 | \snippet ../examples/multiaxis/main.cpp 1 | |
13 |
|
13 | |||
14 | Create a QValueAxis instance that will be used as a horizontal axis by both series and add it the bottom of the chart. |
|
14 | Create a QValueAxis instance that will be used as a horizontal axis by both series and add it the bottom of the chart. | |
15 | Axis can be sharted between many series, but each series can have only one vertical and horizontal axis. |
|
15 | Axis can be sharted between many series, but each series can have only one vertical and horizontal axis. | |
16 |
|
16 | |||
17 | \snippet ../examples/multiaxis/main.cpp 2 |
|
17 | \snippet ../examples/multiaxis/main.cpp 2 | |
18 |
|
18 | |||
19 | Create the first series, add the data to it, finally add the series to the chart. Instantiate its own Y-axis, add it to the chart then attach both the common X-axis and the series specific Y-axis. |
|
19 | Create the first series, add the data to it, finally add the series to the chart. Instantiate its own Y-axis, add it to the chart then attach both the common X-axis and the series specific Y-axis. | |
20 | In this example the color of the axis line is set to be the same as the color of the series to make it possible to distinguish which axis is attached to which series. |
|
20 | In this example the color of the axis line is set to be the same as the color of the series to make it possible to distinguish which axis is attached to which series. | |
21 |
|
21 | |||
22 | \snippet ../examples/multiaxis/main.cpp 3 |
|
22 | \snippet ../examples/multiaxis/main.cpp 3 | |
23 |
|
23 | |||
24 | Similarly prepare another series. This time different axis type is used. Additionally grid lines color is also set to be the same as the color of the series. |
|
24 | Similarly prepare another series. This time different axis type is used. Additionally grid lines color is also set to be the same as the color of the series. | |
25 |
|
25 | |||
26 | \snippet ../examples/multiaxis/main.cpp 4 |
|
26 | \snippet ../examples/multiaxis/main.cpp 4 | |
27 |
|
27 | |||
28 |
Create a QChartView object with QChart as a parameter. Ena |
|
28 | Create a QChartView object with QChart as a parameter. Enable Antialiasing to have the rendered splines look nicer. | |
29 |
|
29 | |||
30 | \snippet ../examples/multiaxis/main.cpp 5 |
|
30 | \snippet ../examples/multiaxis/main.cpp 5 | |
31 |
|
31 | |||
32 | Chart is ready to be shown. |
|
32 | Chart is ready to be shown. | |
33 |
|
33 | |||
34 | \snippet ../examples/multiaxis/main.cpp 6 |
|
34 | \snippet ../examples/multiaxis/main.cpp 6 | |
35 |
|
35 | |||
36 | */ |
|
36 | */ |
@@ -1,9 +1,9 | |||||
1 | /*! |
|
1 | /*! | |
2 | \example examples/scatterinteractions |
|
2 | \example examples/scatterinteractions | |
3 |
\title Scatter |
|
3 | \title ScatterInteractions Example | |
4 | \subtitle |
|
4 | \subtitle | |
5 |
|
5 | |||
6 | The example shows how to create simple scatter chart and how to interact with the chart. |
|
6 | The example shows how to create simple scatter chart and how to interact with the chart. | |
7 |
|
7 | |||
8 | \image examples_scatterinteractions.png |
|
8 | \image examples_scatterinteractions.png | |
9 | */ |
|
9 | */ |
@@ -1,138 +1,138 | |||||
1 | /*! |
|
1 | /*! | |
2 | \page examples.html |
|
2 | \page examples.html | |
3 | \title QtCommercial Charts Examples |
|
3 | \title QtCommercial Charts Examples | |
4 | \keyword Examples |
|
4 | \keyword Examples | |
5 |
|
5 | |||
6 | \raw HTML |
|
6 | \raw HTML | |
7 | <div class="qchart"> |
|
7 | <div class="qchart"> | |
8 |
|
8 | |||
9 | <table> |
|
9 | <table> | |
10 | <tr> |
|
10 | <tr> | |
11 | <td><a href="examples-areachart.html">Area Chart</a></td> |
|
11 | <td><a href="examples-areachart.html">Area Chart</a></td> | |
12 | <td><a href="examples-barchart.html">Bar Chart</a></td> |
|
12 | <td><a href="examples-barchart.html">Bar Chart</a></td> | |
13 | </tr> |
|
13 | </tr> | |
14 | <tr> |
|
14 | <tr> | |
15 | <td><a href="examples-areachart.html"><img src="images/examples_areachart.png" width="300" alt="Area Chart" /></a></td> |
|
15 | <td><a href="examples-areachart.html"><img src="images/examples_areachart.png" width="300" alt="Area Chart" /></a></td> | |
16 | <td><a href="examples-barchart.html"><img src="images/examples_barchart.png" width="300" alt="Bar Chart" /></a></td> |
|
16 | <td><a href="examples-barchart.html"><img src="images/examples_barchart.png" width="300" alt="Bar Chart" /></a></td> | |
17 | </tr> |
|
17 | </tr> | |
18 |
|
18 | |||
19 | <tr> |
|
19 | <tr> | |
20 | <td><a href="examples-barmodelmapper.html">Bar Chart from Model</a></td> |
|
20 | <td><a href="examples-barmodelmapper.html">Bar Chart from Model</a></td> | |
21 | <td><a href="examples-customchart.html">Custom Chart</a></td> |
|
21 | <td><a href="examples-customchart.html">Custom Chart</a></td> | |
22 | </tr> |
|
22 | </tr> | |
23 | <tr> |
|
23 | <tr> | |
24 | <td><a href="examples-barmodelmapper.html"><img src="images/examples_barmodelmapper.png" width="300" alt="Bar Chart from Model" /></a></td> |
|
24 | <td><a href="examples-barmodelmapper.html"><img src="images/examples_barmodelmapper.png" width="300" alt="Bar Chart from Model" /></a></td> | |
25 | <td><a href="examples-customchart.html"><img src="images/examples_customchart.png" width="300" alt="Custom Chart" /></a></td> |
|
25 | <td><a href="examples-customchart.html"><img src="images/examples_customchart.png" width="300" alt="Custom Chart" /></a></td> | |
26 | </tr> |
|
26 | </tr> | |
27 |
|
27 | |||
28 | <tr> |
|
28 | <tr> | |
29 | <td><a href="examples-datetimeaxis.html">DateTimeAxis Example</a></td> |
|
29 | <td><a href="examples-datetimeaxis.html">DateTimeAxis Example</a></td> | |
30 | <td><a href="examples-donutbreakdown.html">Donut Breakdown Chart</a></td> |
|
30 | <td><a href="examples-donutbreakdown.html">Donut Breakdown Chart</a></td> | |
31 | </tr> |
|
31 | </tr> | |
32 | <tr> |
|
32 | <tr> | |
33 | <td><a href="examples-datetimeaxis.html"><img src="images/examples_datetimeaxis.png" width="300" alt="DateTimeAxis Example" /></a></td> |
|
33 | <td><a href="examples-datetimeaxis.html"><img src="images/examples_datetimeaxis.png" width="300" alt="DateTimeAxis Example" /></a></td> | |
34 | <td><a href="examples-donutbreakdown.html"><img src="images/examples_donutbreakdown.png" width="300" alt="Donut Breakdown Chart" /></a></td> |
|
34 | <td><a href="examples-donutbreakdown.html"><img src="images/examples_donutbreakdown.png" width="300" alt="Donut Breakdown Chart" /></a></td> | |
35 | </tr> |
|
35 | </tr> | |
36 |
|
36 | |||
37 | <tr> |
|
37 | <tr> | |
38 | <td><a href="examples-donutchart.html">Donut Chart</a></td> |
|
38 | <td><a href="examples-donutchart.html">Donut Chart</a></td> | |
39 | <td><a href="examples-horizontalbarchart.html">Horizontal Bar Chart</a></td> |
|
39 | <td><a href="examples-horizontalbarchart.html">Horizontal Bar Chart</a></td> | |
40 | </tr> |
|
40 | </tr> | |
41 | <tr> |
|
41 | <tr> | |
42 | <td><a href="examples-donutchart.html"><img src="images/examples_donutchart.png" width="300" alt="Donut Chart" /></a></td> |
|
42 | <td><a href="examples-donutchart.html"><img src="images/examples_donutchart.png" width="300" alt="Donut Chart" /></a></td> | |
43 | <td><a href="examples-horizontalbarchart.html"><img src="images/examples_horizontalbarchart.png" width="300" alt="Horizontal Bar Chart" /></a></td> |
|
43 | <td><a href="examples-horizontalbarchart.html"><img src="images/examples_horizontalbarchart.png" width="300" alt="Horizontal Bar Chart" /></a></td> | |
44 | </tr> |
|
44 | </tr> | |
45 |
|
45 | |||
46 | <tr> |
|
46 | <tr> | |
47 | <td><a href="examples-horizontalpercentbarchart.html">Horizontal Percent Bar Chart</a></td> |
|
47 | <td><a href="examples-horizontalpercentbarchart.html">Horizontal Percent Bar Chart</a></td> | |
48 | <td><a href="examples-horizontalstackedbarchart.html">Horizontal Stacked Bar Chart</a></td> |
|
48 | <td><a href="examples-horizontalstackedbarchart.html">Horizontal Stacked Bar Chart</a></td> | |
49 | </tr> |
|
49 | </tr> | |
50 | <tr> |
|
50 | <tr> | |
51 | <td><a href="examples-horizontalpercentbarchart.html"><img src="images/examples_horizontalpercentbarchart.png" width="300" alt="Horizontal Percent Bar Chart" /></a></td> |
|
51 | <td><a href="examples-horizontalpercentbarchart.html"><img src="images/examples_horizontalpercentbarchart.png" width="300" alt="Horizontal Percent Bar Chart" /></a></td> | |
52 | <td><a href="examples-horizontalstackedbarchart.html"><img src="images/examples_horizontalstackedbarchart.png" width="300" alt="Horizontal Stacked Bar Chart" /></a></td> |
|
52 | <td><a href="examples-horizontalstackedbarchart.html"><img src="images/examples_horizontalstackedbarchart.png" width="300" alt="Horizontal Stacked Bar Chart" /></a></td> | |
53 | </tr> |
|
53 | </tr> | |
54 |
|
54 | |||
55 | <tr> |
|
55 | <tr> | |
56 | <td><a href="examples-legend.html">Legend</a></td> |
|
56 | <td><a href="examples-legend.html">Legend</a></td> | |
57 | <td><a href="examples-legendmarkers.html">Legend Markers</a></td> |
|
57 | <td><a href="examples-legendmarkers.html">Legend Markers</a></td> | |
58 | </tr> |
|
58 | </tr> | |
59 | <tr> |
|
59 | <tr> | |
60 | <td><a href="examples-legend.html"><img src="images/examples_legend_detach.png" width="300" alt="Legend" /></a></td> |
|
60 | <td><a href="examples-legend.html"><img src="images/examples_legend_detach.png" width="300" alt="Legend" /></a></td> | |
61 | <td><a href="examples-legendmarkers.html"><img src="images/examples_legendmarkers.png" width="300" alt="Legend Markers" /></a></td> |
|
61 | <td><a href="examples-legendmarkers.html"><img src="images/examples_legendmarkers.png" width="300" alt="Legend Markers" /></a></td> | |
62 | </tr> |
|
62 | </tr> | |
63 |
|
63 | |||
64 | <tr> |
|
64 | <tr> | |
65 | <td><a href="examples-lineandbar.html">Line and Barchart</a></td> |
|
65 | <td><a href="examples-lineandbar.html">Line and Barchart</a></td> | |
66 | <td><a href="examples-linechart.html">Line Chart</a></td> |
|
66 | <td><a href="examples-linechart.html">Line Chart</a></td> | |
67 | </tr> |
|
67 | </tr> | |
68 | <tr> |
|
68 | <tr> | |
69 | <td><a href="examples-lineandbar.html"><img src="images/examples_lineandbar.png" width="300" alt="Line and Barchart" /></a></td> |
|
69 | <td><a href="examples-lineandbar.html"><img src="images/examples_lineandbar.png" width="300" alt="Line and Barchart" /></a></td> | |
70 | <td><a href="examples-linechart.html"><img src="images/examples_linechart.png" width="300" alt="Line Chart" /></a></td> |
|
70 | <td><a href="examples-linechart.html"><img src="images/examples_linechart.png" width="300" alt="Line Chart" /></a></td> | |
71 | </tr> |
|
71 | </tr> | |
72 |
|
72 | |||
73 | <tr> |
|
73 | <tr> | |
74 |
<td><a href="examples-logvalueaxis.html">Logar |
|
74 | <td><a href="examples-logvalueaxis.html">Logarithmic axis</a></td> | |
75 | <td><a href="examples-modeldata.html">Model Data</a></td> |
|
75 | <td><a href="examples-modeldata.html">Model Data</a></td> | |
76 | </tr> |
|
76 | </tr> | |
77 | <tr> |
|
77 | <tr> | |
78 | <td><a href="examples-logvalueaxis.html"><img src="images/examples_logvalueaxis.png" width="300" alt="Logarythmix axis" /></a></td> |
|
78 | <td><a href="examples-logvalueaxis.html"><img src="images/examples_logvalueaxis.png" width="300" alt="Logarythmix axis" /></a></td> | |
79 | <td><a href="examples-modeldata.html"><img src="images/examples_modeldata.png" width="300" alt="Model Data" /></a></td> |
|
79 | <td><a href="examples-modeldata.html"><img src="images/examples_modeldata.png" width="300" alt="Model Data" /></a></td> | |
80 | </tr> |
|
80 | </tr> | |
81 |
|
81 | |||
82 | <tr> |
|
82 | <tr> | |
83 | <td><a href="examples-multiaxis.html">Multiple axes</a></td> |
|
83 | <td><a href="examples-multiaxis.html">Multiple axes</a></td> | |
84 | <td><a href="examples-percentbarchart.html">Percent Bar Chart</a></td> |
|
84 | <td><a href="examples-percentbarchart.html">Percent Bar Chart</a></td> | |
85 | </tr> |
|
85 | </tr> | |
86 | <tr> |
|
86 | <tr> | |
87 | <td><a href="examples-multiaxis.html"><img src="images/examples_multiaxis.png" width="300" alt="Multiple axes" /></a></td> |
|
87 | <td><a href="examples-multiaxis.html"><img src="images/examples_multiaxis.png" width="300" alt="Multiple axes" /></a></td> | |
88 | <td><a href="examples-percentbarchart.html"><img src="images/examples_percentbarchart.png" width="300" alt="Percent Bar Chart" /></a></td> |
|
88 | <td><a href="examples-percentbarchart.html"><img src="images/examples_percentbarchart.png" width="300" alt="Percent Bar Chart" /></a></td> | |
89 | </tr> |
|
89 | </tr> | |
90 |
|
90 | |||
91 | <tr> |
|
91 | <tr> | |
92 | <td><a href="examples-piechart.html">Pie Chart</a></td> |
|
92 | <td><a href="examples-piechart.html">Pie Chart</a></td> | |
93 | <td><a href="examples-piechartdrilldown.html">Pie Chart Drilldown</a></td> |
|
93 | <td><a href="examples-piechartdrilldown.html">Pie Chart Drilldown</a></td> | |
94 | </tr> |
|
94 | </tr> | |
95 | <tr> |
|
95 | <tr> | |
96 | <td><a href="examples-piechart.html"><img src="images/examples_piechart.png" width="300" alt="Pie Chart" /></a></td> |
|
96 | <td><a href="examples-piechart.html"><img src="images/examples_piechart.png" width="300" alt="Pie Chart" /></a></td> | |
97 | <td><a href="examples-piechartdrilldown.html"><img src="images/examples_piechartdrill2.png" width="300" alt="Pie Chart Drilldown" /></a></td> |
|
97 | <td><a href="examples-piechartdrilldown.html"><img src="images/examples_piechartdrill2.png" width="300" alt="Pie Chart Drilldown" /></a></td> | |
98 | </tr> |
|
98 | </tr> | |
99 |
|
99 | |||
100 | <tr> |
|
100 | <tr> | |
101 | <td><a href="examples-scatterchart.html">Scatter chart</a></td> |
|
101 | <td><a href="examples-scatterchart.html">Scatter chart</a></td> | |
102 | <td><a href="examples-scatterinteractions.html">Scatter Interactions</a></td> |
|
102 | <td><a href="examples-scatterinteractions.html">Scatter Interactions</a></td> | |
103 | </tr> |
|
103 | </tr> | |
104 | <tr> |
|
104 | <tr> | |
105 | <td><a href="examples-scatterchart.html"><img src="images/examples_scatterchart.png" width="300" alt="Scatter chart" /></a></td> |
|
105 | <td><a href="examples-scatterchart.html"><img src="images/examples_scatterchart.png" width="300" alt="Scatter chart" /></a></td> | |
106 | <td><a href="examples-scatterinteractions.html"><img src="images/examples_scatterinteractions.png" width="300" alt="Scatter Interactions" /></a></td> |
|
106 | <td><a href="examples-scatterinteractions.html"><img src="images/examples_scatterinteractions.png" width="300" alt="Scatter Interactions" /></a></td> | |
107 | </tr> |
|
107 | </tr> | |
108 |
|
108 | |||
109 | <tr> |
|
109 | <tr> | |
110 | <td><a href="examples-splinechart.html">Spline Chart</a></td> |
|
110 | <td><a href="examples-splinechart.html">Spline Chart</a></td> | |
111 | <td><a href="examples-stackedbarchart.html">Stacked Bar Chart</a></td> |
|
111 | <td><a href="examples-stackedbarchart.html">Stacked Bar Chart</a></td> | |
112 | </tr> |
|
112 | </tr> | |
113 | <tr> |
|
113 | <tr> | |
114 | <td><a href="examples-splinechart.html"><img src="images/examples_splinechart.png" width="300" alt="Spline Chart" /></a></td> |
|
114 | <td><a href="examples-splinechart.html"><img src="images/examples_splinechart.png" width="300" alt="Spline Chart" /></a></td> | |
115 | <td><a href="examples-stackedbarchart.html"><img src="images/examples_stackedbarchart.png" width="300" alt="Stacked Bar Chart" /></a></td> |
|
115 | <td><a href="examples-stackedbarchart.html"><img src="images/examples_stackedbarchart.png" width="300" alt="Stacked Bar Chart" /></a></td> | |
116 | </tr> |
|
116 | </tr> | |
117 |
|
117 | |||
118 | <tr> |
|
118 | <tr> | |
119 | <td><a href="examples-stackedbarchartdrilldown.html">Stacked Bar Chart Drilldown</a></td> |
|
119 | <td><a href="examples-stackedbarchartdrilldown.html">Stacked Bar Chart Drilldown</a></td> | |
120 | <td><a href="examples-temperaturerecords.html">Temperature Records</a></td> |
|
120 | <td><a href="examples-temperaturerecords.html">Temperature Records</a></td> | |
121 | </tr> |
|
121 | </tr> | |
122 | <tr> |
|
122 | <tr> | |
123 | <td><a href="examples-stackedbarchartdrilldown.html"><img src="images/examples_stackedbarchartdrilldown1.png" width="300" alt="Stacked Bar Chart Drilldown" /></a></td> |
|
123 | <td><a href="examples-stackedbarchartdrilldown.html"><img src="images/examples_stackedbarchartdrilldown1.png" width="300" alt="Stacked Bar Chart Drilldown" /></a></td> | |
124 | <td><a href="examples-temperaturerecords.html"><img src="images/examples_temperaturerecords.png" width="300" alt="Temperature Records" /></a></td> |
|
124 | <td><a href="examples-temperaturerecords.html"><img src="images/examples_temperaturerecords.png" width="300" alt="Temperature Records" /></a></td> | |
125 | </tr> |
|
125 | </tr> | |
126 |
|
126 | |||
127 | <tr> |
|
127 | <tr> | |
128 | <td><a href="examples-zoomlinechart.html">Zoom Line</a></td> |
|
128 | <td><a href="examples-zoomlinechart.html">Zoom Line</a></td> | |
129 | </tr> |
|
129 | </tr> | |
130 | <tr> |
|
130 | <tr> | |
131 | <td><a href="examples-zoomlinechart.html"><img src="images/examples_zoomlinechart1.png" width="300" alt="Zoom Line" /></a></td> |
|
131 | <td><a href="examples-zoomlinechart.html"><img src="images/examples_zoomlinechart1.png" width="300" alt="Zoom Line" /></a></td> | |
132 | </tr> |
|
132 | </tr> | |
133 |
|
133 | |||
134 | </table> |
|
134 | </table> | |
135 | </div> |
|
135 | </div> | |
136 | \endraw |
|
136 | \endraw | |
137 |
|
137 | |||
138 | */ |
|
138 | */ |
@@ -1,66 +1,66 | |||||
1 | /*! |
|
1 | /*! | |
2 | \page gettingstarted.html |
|
2 | \page gettingstarted.html | |
3 | \title QtCommercial Charts getting started |
|
3 | \title QtCommercial Charts getting started | |
4 | \keyword Introduction |
|
4 | \keyword Introduction | |
5 |
|
5 | |||
6 | Compiling: |
|
6 | Compiling: | |
7 | \code |
|
7 | \code | |
8 | qmake CONFIG+=release |
|
8 | qmake CONFIG+=release | |
9 | make |
|
9 | make | |
10 | make install |
|
10 | make install | |
11 | \endcode |
|
11 | \endcode | |
12 |
|
12 | |||
13 | Depending on the OS and the compiler you are using "make" might need to be replaced with another command like: nmake, mingw32-make, etc. |
|
13 | Depending on the OS and the compiler you are using "make" might need to be replaced with another command like: nmake, mingw32-make, etc. | |
14 |
|
14 | |||
15 | To uninstall the QtCommercialCharts run: |
|
15 | To uninstall the QtCommercialCharts run: | |
16 | \code |
|
16 | \code | |
17 | make uninstall |
|
17 | make uninstall | |
18 | \endcode |
|
18 | \endcode | |
19 |
|
19 | |||
20 | Compiling as a static library (lib only): |
|
20 | Compiling as a static library (lib only): | |
21 | \code |
|
21 | \code | |
22 | qmake CONFIG+=staticlib |
|
22 | qmake CONFIG+=staticlib | |
23 | make |
|
23 | make | |
24 | make install |
|
24 | make install | |
25 | \endcode |
|
25 | \endcode | |
26 |
|
26 | |||
27 | Building both debug and release at the same time: |
|
27 | Building both debug and release at the same time: | |
28 | \code |
|
28 | \code | |
29 | qmake CONFIG+="debug_and_release build_all" |
|
29 | qmake CONFIG+="debug_and_release build_all" | |
30 | make |
|
30 | make | |
31 | make install |
|
31 | make install | |
32 | \endcode |
|
32 | \endcode | |
33 |
|
33 | |||
34 | Please take a note that the \i build_all option is necessary for the install to work correctly. Otherwise it will not install both versions. |
|
34 | Please take a note that the \i build_all option is necessary for the install to work correctly. Otherwise it will not install both versions. | |
35 |
|
35 | |||
36 | \bold {New project} |
|
36 | \bold {New project} | |
37 |
|
37 | |||
38 | Create a new project in a usual way and then add to your project's *.pro file following line: |
|
38 | Create a new project in a usual way and then add to your project's *.pro file following line: | |
39 |
|
39 | |||
40 | \code |
|
40 | \code | |
41 | CONFIG += qtcommercialchart |
|
41 | CONFIG += qtcommercialchart | |
42 | \endcode |
|
42 | \endcode | |
43 |
|
43 | |||
44 | \bold {Widget project} |
|
44 | \bold {Widget project} | |
45 |
|
45 | |||
46 | To use the QCharts classes add QtCommercialChart namespace macro in your header file. |
|
46 | To use the QCharts classes add QtCommercialChart namespace macro in your header file. | |
47 | \code |
|
47 | \code | |
48 | #include<QWidget> |
|
48 | #include<QWidget> | |
49 | #include<QChartView> |
|
49 | #include<QChartView> | |
50 |
|
50 | |||
51 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
51 | QTCOMMERCIALCHART_USE_NAMESPACE | |
52 |
|
52 | |||
53 | class ExampleWidget : public QWidget |
|
53 | class ExampleWidget : public QWidget | |
54 | \endcode |
|
54 | \endcode | |
55 |
|
55 | |||
56 | \bold {QML project} |
|
56 | \bold {QML project} | |
57 |
|
57 | |||
58 | Add an import line to your *.qml file: |
|
58 | Add an import line to your *.qml file: | |
59 | \code |
|
59 | \code | |
60 |
import QtCommercial.Chart 1. |
|
60 | import QtCommercial.Chart 1.2 | |
61 | \endcode |
|
61 | \endcode | |
62 |
|
62 | |||
63 | \raw HTML |
|
63 | \raw HTML | |
64 | \endraw |
|
64 | \endraw | |
65 |
|
65 | |||
66 | */ |
|
66 | */ |
@@ -1,93 +1,93 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2013 Digia Plc |
|
3 | ** Copyright (C) 2013 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | #include <QApplication> |
|
21 | #include <QApplication> | |
22 | #include <QMainWindow> |
|
22 | #include <QMainWindow> | |
23 | #include <QChartView> |
|
23 | #include <QChartView> | |
24 | #include <QBarSeries> |
|
24 | #include <QBarSeries> | |
25 | #include <QBarSet> |
|
25 | #include <QBarSet> | |
26 | #include <QLegend> |
|
26 | #include <QLegend> | |
27 | #include <QBarCategoryAxis> |
|
27 | #include <QBarCategoryAxis> | |
28 |
|
28 | |||
29 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
29 | QTCOMMERCIALCHART_USE_NAMESPACE | |
30 |
|
30 | |||
31 | int main(int argc, char *argv[]) |
|
31 | int main(int argc, char *argv[]) | |
32 | { |
|
32 | { | |
33 | QApplication a(argc, argv); |
|
33 | QApplication a(argc, argv); | |
34 |
|
34 | |||
35 | //![1] |
|
35 | //![1] | |
36 | QBarSet *set0 = new QBarSet("Jane"); |
|
36 | QBarSet *set0 = new QBarSet("Jane"); | |
37 | QBarSet *set1 = new QBarSet("John"); |
|
37 | QBarSet *set1 = new QBarSet("John"); | |
38 | QBarSet *set2 = new QBarSet("Axel"); |
|
38 | QBarSet *set2 = new QBarSet("Axel"); | |
39 | QBarSet *set3 = new QBarSet("Mary"); |
|
39 | QBarSet *set3 = new QBarSet("Mary"); | |
40 | QBarSet *set4 = new QBarSet("Samantha"); |
|
40 | QBarSet *set4 = new QBarSet("Samantha"); | |
41 |
|
41 | |||
42 | *set0 << 1 << 2 << 3 << 4 << 5 << 6; |
|
42 | *set0 << 1 << 2 << 3 << 4 << 5 << 6; | |
43 | *set1 << 5 << 0 << 0 << 4 << 0 << 7; |
|
43 | *set1 << 5 << 0 << 0 << 4 << 0 << 7; | |
44 | *set2 << 3 << 5 << 8 << 13 << 8 << 5; |
|
44 | *set2 << 3 << 5 << 8 << 13 << 8 << 5; | |
45 | *set3 << 5 << 6 << 7 << 3 << 4 << 5; |
|
45 | *set3 << 5 << 6 << 7 << 3 << 4 << 5; | |
46 | *set4 << 9 << 7 << 5 << 3 << 1 << 2; |
|
46 | *set4 << 9 << 7 << 5 << 3 << 1 << 2; | |
47 | //![1] |
|
47 | //![1] | |
48 |
|
48 | |||
49 | //![2] |
|
49 | //![2] | |
50 | QBarSeries *series = new QBarSeries(); |
|
50 | QBarSeries *series = new QBarSeries(); | |
51 | series->append(set0); |
|
51 | series->append(set0); | |
52 | series->append(set1); |
|
52 | series->append(set1); | |
53 | series->append(set2); |
|
53 | series->append(set2); | |
54 | series->append(set3); |
|
54 | series->append(set3); | |
55 | series->append(set4); |
|
55 | series->append(set4); | |
56 |
|
56 | |||
57 | //![2] |
|
57 | //![2] | |
58 |
|
58 | |||
59 | //![3] |
|
59 | //![3] | |
60 | QChart *chart = new QChart(); |
|
60 | QChart *chart = new QChart(); | |
61 | chart->addSeries(series); |
|
61 | chart->addSeries(series); | |
62 | chart->setTitle("Simple barchart example"); |
|
62 | chart->setTitle("Simple barchart example"); | |
63 | chart->setAnimationOptions(QChart::SeriesAnimations); |
|
63 | chart->setAnimationOptions(QChart::SeriesAnimations); | |
64 | //![3] |
|
64 | //![3] | |
65 |
|
65 | |||
66 | //![4] |
|
66 | //![4] | |
67 | QStringList categories; |
|
67 | QStringList categories; | |
68 | categories << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun"; |
|
68 | categories << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun"; | |
69 | QBarCategoryAxis *axis = new QBarCategoryAxis(); |
|
69 | QBarCategoryAxis *axis = new QBarCategoryAxis(); | |
70 | axis->append(categories); |
|
70 | axis->append(categories); | |
71 | chart->createDefaultAxes(); |
|
71 | chart->createDefaultAxes(); | |
72 |
|
|
72 | chart->setAxisX(axis, series); | |
73 | //![4] |
|
73 | //![4] | |
74 |
|
74 | |||
75 | //![5] |
|
75 | //![5] | |
76 | chart->legend()->setVisible(true); |
|
76 | chart->legend()->setVisible(true); | |
77 | chart->legend()->setAlignment(Qt::AlignBottom); |
|
77 | chart->legend()->setAlignment(Qt::AlignBottom); | |
78 | //![5] |
|
78 | //![5] | |
79 |
|
79 | |||
80 | //![6] |
|
80 | //![6] | |
81 | QChartView *chartView = new QChartView(chart); |
|
81 | QChartView *chartView = new QChartView(chart); | |
82 | chartView->setRenderHint(QPainter::Antialiasing); |
|
82 | chartView->setRenderHint(QPainter::Antialiasing); | |
83 | //![6] |
|
83 | //![6] | |
84 |
|
84 | |||
85 | //![7] |
|
85 | //![7] | |
86 | QMainWindow window; |
|
86 | QMainWindow window; | |
87 | window.setCentralWidget(chartView); |
|
87 | window.setCentralWidget(chartView); | |
88 | window.resize(400, 300); |
|
88 | window.resize(400, 300); | |
89 | window.show(); |
|
89 | window.show(); | |
90 | //![7] |
|
90 | //![7] | |
91 |
|
91 | |||
92 | return a.exec(); |
|
92 | return a.exec(); | |
93 | } |
|
93 | } |
@@ -1,80 +1,67 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2013 Digia Plc |
|
3 | ** Copyright (C) 2013 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | #include <QApplication> |
|
21 | #include <QApplication> | |
22 | #include <QMainWindow> |
|
22 | #include <QMainWindow> | |
23 | #include <QChartView> |
|
23 | #include <QChartView> | |
24 | #include <QLineSeries> |
|
24 | #include <QLineSeries> | |
25 |
|
25 | |||
26 | QTCOMMERCIALCHART_USE_NAMESPACE |
|
26 | QTCOMMERCIALCHART_USE_NAMESPACE | |
27 |
|
27 | |||
28 | int main(int argc, char *argv[]) |
|
28 | int main(int argc, char *argv[]) | |
29 | { |
|
29 | { | |
30 | QApplication a(argc, argv); |
|
30 | QApplication a(argc, argv); | |
31 |
|
31 | |||
32 | //![1] |
|
32 | //![1] | |
33 | QLineSeries *series = new QLineSeries(); |
|
33 | QLineSeries *series = new QLineSeries(); | |
34 | QLineSeries *series2 = new QLineSeries(); |
|
|||
35 | //![1] |
|
34 | //![1] | |
36 |
|
35 | |||
37 | //![2] |
|
36 | //![2] | |
38 | *series << QPointF(0.06197, 0.16) |
|
37 | series->append(0, 6); | |
39 | << QPointF(0.18694, 0.16) |
|
38 | series->append(2, 4); | |
40 | << QPointF(0.3119, 0.16) |
|
39 | series->append(3, 8); | |
41 | << QPointF(0.43687, 0.16) |
|
40 | series->append(7, 4); | |
42 | << QPointF(0.56183, 0.16) |
|
41 | series->append(10, 5); | |
43 | << QPointF(0.68678, 0.16) |
|
42 | *series << QPointF(11, 1) << QPointF(13, 3) << QPointF(17, 6) << QPointF(18, 3) << QPointF(20, 2); | |
44 | << QPointF(0.81173, 0.16) |
|
|||
45 | << QPointF(0.93667, 0.16); |
|
|||
46 |
|
||||
47 | *series2 << QPointF(0.06197, 0.16) |
|
|||
48 | << QPointF(0.18694, 0.16) |
|
|||
49 | << QPointF(0.3119, 0.16) |
|
|||
50 | << QPointF(0.43687, 0.16) |
|
|||
51 | << QPointF(0.56183, 0.16) |
|
|||
52 | << QPointF(0.68678, 0.16) |
|
|||
53 | << QPointF(0.81173, 0.16) |
|
|||
54 | << QPointF(0.93667, 0.16); |
|
|||
55 | //![2] |
|
43 | //![2] | |
56 |
|
44 | |||
57 | //![3] |
|
45 | //![3] | |
58 | QChart *chart = new QChart(); |
|
46 | QChart *chart = new QChart(); | |
59 | chart->legend()->hide(); |
|
47 | chart->legend()->hide(); | |
60 | chart->addSeries(series); |
|
48 | chart->addSeries(series); | |
61 | chart->addSeries(series2); |
|
|||
62 | chart->createDefaultAxes(); |
|
49 | chart->createDefaultAxes(); | |
63 | chart->setTitle("Simple line chart example"); |
|
50 | chart->setTitle("Simple line chart example"); | |
64 | //![3] |
|
51 | //![3] | |
65 |
|
52 | |||
66 | //![4] |
|
53 | //![4] | |
67 | QChartView *chartView = new QChartView(chart); |
|
54 | QChartView *chartView = new QChartView(chart); | |
68 | chartView->setRenderHint(QPainter::Antialiasing); |
|
55 | chartView->setRenderHint(QPainter::Antialiasing); | |
69 | //![4] |
|
56 | //![4] | |
70 |
|
57 | |||
71 |
|
58 | |||
72 | //![5] |
|
59 | //![5] | |
73 | QMainWindow window; |
|
60 | QMainWindow window; | |
74 | window.setCentralWidget(chartView); |
|
61 | window.setCentralWidget(chartView); | |
75 | window.resize(400, 300); |
|
62 | window.resize(400, 300); | |
76 | window.show(); |
|
63 | window.show(); | |
77 | //![5] |
|
64 | //![5] | |
78 |
|
65 | |||
79 | return a.exec(); |
|
66 | return a.exec(); | |
80 | } |
|
67 | } |
General Comments 0
You need to be logged in to leave comments.
Login now