diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-04-16 10:07:13 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-04-17 10:14:43 +0300 |
commit | f494279b6366b06e3eeeb4f8c006ce76b08f10d7 (patch) | |
tree | 26951efa14e26eb0791d13ea32624e9afcf48851 /doc | |
parent | 56fd46a395765db6818f890676e42cc59a9f4a81 (diff) |
Add Polar chart support
This commit also heavily refactors things as polar chart needs
separate implementation of various classes that previously
only needed one, such as ChartAxis and ChartLayout.
Task-number: QTRD-1757
Change-Id: I3d3db23920314987ceef3ae92879960b833b7136
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/images/demos_qmlpolarchart1.png | bin | 0 -> 41088 bytes | |||
-rw-r--r-- | doc/images/demos_qmlpolarchart2.png | bin | 0 -> 42741 bytes | |||
-rw-r--r-- | doc/images/demos_qmlpolarchart3.png | bin | 0 -> 35469 bytes | |||
-rw-r--r-- | doc/images/examples_polarchart.png | bin | 0 -> 116120 bytes | |||
-rw-r--r-- | doc/src/classes.qdoc | 1 | ||||
-rw-r--r-- | doc/src/demos-qmlpolarchart.qdoc | 33 | ||||
-rw-r--r-- | doc/src/demos.qdoc | 20 | ||||
-rw-r--r-- | doc/src/examples-polarchart.qdoc | 33 | ||||
-rw-r--r-- | doc/src/examples.qdoc | 14 | ||||
-rw-r--r-- | doc/src/qml.qdoc | 1 |
10 files changed, 86 insertions, 16 deletions
diff --git a/doc/images/demos_qmlpolarchart1.png b/doc/images/demos_qmlpolarchart1.png Binary files differnew file mode 100644 index 00000000..58be80e6 --- /dev/null +++ b/doc/images/demos_qmlpolarchart1.png diff --git a/doc/images/demos_qmlpolarchart2.png b/doc/images/demos_qmlpolarchart2.png Binary files differnew file mode 100644 index 00000000..35c3521a --- /dev/null +++ b/doc/images/demos_qmlpolarchart2.png diff --git a/doc/images/demos_qmlpolarchart3.png b/doc/images/demos_qmlpolarchart3.png Binary files differnew file mode 100644 index 00000000..31a68dc6 --- /dev/null +++ b/doc/images/demos_qmlpolarchart3.png diff --git a/doc/images/examples_polarchart.png b/doc/images/examples_polarchart.png Binary files differnew file mode 100644 index 00000000..f5ea517a --- /dev/null +++ b/doc/images/examples_polarchart.png diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc index 89f4d070..07be9dd8 100644 --- a/doc/src/classes.qdoc +++ b/doc/src/classes.qdoc @@ -30,6 +30,7 @@ <td valign="top"> <ul> <li><a href="qchart.html">QChart</a></li> + <li><a href="qpolarchart.html">QPolarChart</a></li> <li><a href="qchartview.html">QChartView</a></li> <li><a href="qabstractaxis.html">QAbstractAxis</a></li> <li><a href="qvalueaxis.html">QValueAxis</a></li> diff --git a/doc/src/demos-qmlpolarchart.qdoc b/doc/src/demos-qmlpolarchart.qdoc new file mode 100644 index 00000000..04c7037e --- /dev/null +++ b/doc/src/demos-qmlpolarchart.qdoc @@ -0,0 +1,33 @@ +/*! + \example demos/qmlpolarchart + \title Qml Polar Chart + \subtitle + + This is a demonstration of how to use polar chart in your QML application. + + \table + \row + \o \br + We begin with a chart that has a spline series and a scatter series with random + data. Both series use the same axes. + \br + \br + \snippet ../demos/qmlpolarchart/qml/qmlpolarchart/View1.qml 1 + \o \inlineimage demos_qmlpolarchart1.png + \row + \o \br + The next example shows a chart with some accurate historical data that makes us to use a DateTimeAxis + and AreaSeries. + \br + \br + \snippet ../demos/qmlpolarchart/qml/qmlpolarchart/View2.qml 1 + \o \inlineimage demos_qmlpolarchart2.png + \row + \o \br + And the final example with a chart that uses a CategoryAxis to make the data easier to understand. + \br + \br + \snippet ../demos/qmlpolarchart/qml/qmlpolarchart/View3.qml 1 + \o \inlineimage demos_qmlpolarchart3.png + \endtable +*/ diff --git a/doc/src/demos.qdoc b/doc/src/demos.qdoc index 573b416a..6316617a 100644 --- a/doc/src/demos.qdoc +++ b/doc/src/demos.qdoc @@ -8,6 +8,14 @@ <table> <tr> + <td><a href="demos-audio.html">Audio</a></td> + <td><a href="demos-callout.html">Callout</a></td> + </tr> + <tr> + <td><a href="demos-audio.html"><img src="images/demos_audio.png" width="300" alt="Audio" /></a></td> + <td><a href="demos-callout.html"><img src="images/demos_callout.png" width="300" alt="Callout" /></a></td> + </tr> + <tr> <td><a href="demos-chartthemes.html">Chart Themes</a></td> <td><a href="demos-dynamicspline.html">Dynamic Spline Chart</a></td> </tr> @@ -15,7 +23,6 @@ <td><a href="demos-chartthemes.html"><img src="images/demo_chartthemes_blue_cerulean.png" width="300" alt="Chart Themes" /></a></td> <td><a href="demos-dynamicspline.html"><img src="images/demos_dynamicspline2.png" width="300" alt="Dynamic Spline" /></a></td> </tr> - <tr> <td><a href="demos-nesteddonuts.html">Nested Donuts Chart</a></td> <td><a href="demos-piechartcustomization.html">Pie Chart Customization</a></td> @@ -24,7 +31,6 @@ <td><a href="demos-nesteddonuts.html"><img src="images/demos_nesteddonuts.png" width="300" alt="Nested Donuts Chart" /></a></td> <td><a href="demos-piechartcustomization.html"><img src="images/piechart_customization.png" width="300" alt="Pie Chart Customization" /></a></td> </tr> - <tr> <td><a href="demos-qmlchart.html">Qml Basic Charts</a></td> <td><a href="demos-qmlaxes.html">Qml Axes</a></td> @@ -33,7 +39,6 @@ <td><a href="demos-qmlchart.html"><img src="images/demos_qmlchart1.png" width="300" alt="Qml Basic Charts" /></a></td> <td><a href="demos-qmlaxes.html"><img src="images/demos_qmlaxes1.png" width="300" alt="Qml Axes" /></a></td> </tr> - <tr> <td><a href="demos-qmlcustomizations.html">Qml Customizations</a></td> <td><a href="demos-qmlcustommodel.html">Qml Custom Model</a></td> @@ -42,7 +47,6 @@ <td><a href="demos-qmlcustomizations.html"><img src="images/demos_qmlcustomizations.png" width="300" alt="Qml Customizations" /></a></td> <td><a href="demos-qmlcustommodel.html"><img src="images/demos_qmlcustommodel.png" width="300" alt="Qml Custom Model" /></a></td> </tr> - <tr> <td><a href="demos-qmlf1legends.html">Qml F1 Legends</a></td> <td><a href="demos-qmloscilloscope.html">Qml Oscilloscope</a></td> @@ -51,7 +55,6 @@ <td><a href="demos-qmlf1legends.html"><img src="images/demos_qmlf1legends.png" width="300" alt="Qml F1 Legends" /></a></td> <td><a href="demos-qmloscilloscope.html"><img src="images/demos_qmloscilloscope.png" width="300" alt="Qml Oscilloscope" /></a></td> </tr> - <tr> <td><a href="demos-qmlweather.html">Qml Weather</a></td> <td><a href="demos-qmlcustomlegend.html">Qml Custom Legend</a></td> @@ -61,14 +64,11 @@ <td><a href="demos-qmlcustomlegend.html"><img src="images/demos-qmlcustomlegend1.png" width="300" alt="Qml Custom Legend" /></a></td> </tr> <tr> - <td><a href="demos-callout.html">Callout</a></td> - <td><a href="demos-audio.html">Audio</a></td> + <td><a href="demos-qmlpolarchart.html">Qml Polar Chart</a></td> </tr> <tr> - <td><a href="demos-callout.html"><img src="images/demos_callout.png" width="300" alt="Callout" /></a></td> - <td><a href="demos-audio.html"><img src="images/demos_audio.png" width="300" alt="Audio" /></a></td> + <td><a href="demos-qmlpolarchart.html"><img src="images/demos_qmlpolarchart1.png" width="300" alt="Qml Polar Chart" /></a></td> </tr> - </table> </div> \endraw diff --git a/doc/src/examples-polarchart.qdoc b/doc/src/examples-polarchart.qdoc new file mode 100644 index 00000000..d9f976d6 --- /dev/null +++ b/doc/src/examples-polarchart.qdoc @@ -0,0 +1,33 @@ +/*! + \example examples/polarchart + \title Polar chart example + \subtitle + + The example shows how to create simple polar chart with multiple different series. + It also shows how to implement scrolling and zooming of the polar chart as well as + visually demonstrate how polar chart and cartesian chart relate to each other. + + \image examples_polarchart.png + + Creating polar chart is done via QPolarChart instance instead of QChart. + + \snippet ../examples/polarchart/main.cpp 1 + + Axes are created similarly to cartesian charts, but when axes are added to the chart, + you can use polar orientations instead of alignments. + + \snippet ../examples/polarchart/main.cpp 2 + + Zooming and scrolling of the polar chart is logically nearly identical to zooming and scrolling of cartesian chart. + The main difference is that when scrolling along X-axis (angular axis), angle is used instead of number of pixels. + Another difference is that zooming to a rectangle cannot be done. + + \snippet ../examples/polarchart/chartview.cpp 1 + + Same axes and series can be used in both cartesian and polar charts, though not simultaneously. + To switch between chart types, you need to first remove series and axes from the old chart and then add + them to the new chart. If you want to preserve axis ranges, those need to be copied, too. + + \snippet ../examples/polarchart/chartview.cpp 2 + +*/ diff --git a/doc/src/examples.qdoc b/doc/src/examples.qdoc index f0588bec..f5c736eb 100644 --- a/doc/src/examples.qdoc +++ b/doc/src/examples.qdoc @@ -98,36 +98,38 @@ </tr> <tr> + <td><a href="examples-polarchart.html">Polar chart</a></td> <td><a href="examples-scatterchart.html">Scatter chart</a></td> - <td><a href="examples-scatterinteractions.html">Scatter Interactions</a></td> </tr> <tr> + <td><a href="examples-polarchart.html"><img src="images/examples_polarchart.png" width="300" alt="Polar chart" /></a></td> <td><a href="examples-scatterchart.html"><img src="images/examples_scatterchart.png" width="300" alt="Scatter chart" /></a></td> - <td><a href="examples-scatterinteractions.html"><img src="images/examples_scatterinteractions.png" width="300" alt="Scatter Interactions" /></a></td> </tr> <tr> + <td><a href="examples-scatterinteractions.html">Scatter Interactions</a></td> <td><a href="examples-splinechart.html">Spline Chart</a></td> - <td><a href="examples-stackedbarchart.html">Stacked Bar Chart</a></td> </tr> <tr> + <td><a href="examples-scatterinteractions.html"><img src="images/examples_scatterinteractions.png" width="300" alt="Scatter Interactions" /></a></td> <td><a href="examples-splinechart.html"><img src="images/examples_splinechart.png" width="300" alt="Spline Chart" /></a></td> - <td><a href="examples-stackedbarchart.html"><img src="images/examples_stackedbarchart.png" width="300" alt="Stacked Bar Chart" /></a></td> </tr> <tr> + <td><a href="examples-stackedbarchart.html">Stacked Bar Chart</a></td> <td><a href="examples-stackedbarchartdrilldown.html">Stacked Bar Chart Drilldown</a></td> - <td><a href="examples-temperaturerecords.html">Temperature Records</a></td> </tr> <tr> + <td><a href="examples-stackedbarchart.html"><img src="images/examples_stackedbarchart.png" width="300" alt="Stacked Bar Chart" /></a></td> <td><a href="examples-stackedbarchartdrilldown.html"><img src="images/examples_stackedbarchartdrilldown1.png" width="300" alt="Stacked Bar Chart Drilldown" /></a></td> - <td><a href="examples-temperaturerecords.html"><img src="images/examples_temperaturerecords.png" width="300" alt="Temperature Records" /></a></td> </tr> <tr> + <td><a href="examples-temperaturerecords.html">Temperature Records</a></td> <td><a href="examples-zoomlinechart.html">Zoom Line</a></td> </tr> <tr> + <td><a href="examples-temperaturerecords.html"><img src="images/examples_temperaturerecords.png" width="300" alt="Temperature Records" /></a></td> <td><a href="examples-zoomlinechart.html"><img src="images/examples_zoomlinechart1.png" width="300" alt="Zoom Line" /></a></td> </tr> diff --git a/doc/src/qml.qdoc b/doc/src/qml.qdoc index 9fbb9fee..d7fae7e6 100644 --- a/doc/src/qml.qdoc +++ b/doc/src/qml.qdoc @@ -27,6 +27,7 @@ <td valign="top"> <ul> <li><a href="qml-chartview.html">ChartView</a></li> + <li><a href="qml-polarchartview.html">PolarChartView</a></li> <li><a href="qml-abstractaxis.html">AbstractAxis</a></li> <li><a href="qml-valueaxis.html">ValueAxis</a></li> <li><a href="qml-categoryaxis.html">CategoryAxis</a></li> |