##// END OF EJS Templates
Selectable outlines for box...
Selectable outlines for box Change-Id: Ic31fa26f914baaa6c26f52c73ca4328ec7523581 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>

File last commit:

r2483:f494279b6366
r2573:3880b19e7795
Show More
examples-polarchart.qdoc
33 lines | 1.4 KiB | text/plain | TextLexer
/ doc / src / examples-polarchart.qdoc
/*!
\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
*/