##// END OF EJS Templates
Renamed donutdrilldown example to donutbreakdown
Marek Rosa -
r1761:34fc5c0da098
parent child
Show More
@@ -1,44 +1,44
1 /*!
1 /*!
2 \example examples/donutdrilldown
2 \example examples/donutbreakdown
3 \title Donut chart drilldown example
3 \title Donut chart breakdown example
4 \subtitle
4 \subtitle
5
5
6 This example shows how to use create a donut drilldown chart using QPieSeries API.
6 This example shows how to use create a donut breakdown chart using QPieSeries API.
7
7
8 Let's start by creating a QChartView instance and enabling the Antialiasing on it. Last line enables the animations of the chart.
8 Let's start by creating a QChartView instance and enabling the Antialiasing on it. Last line enables the animations of the chart.
9
9
10 \snippet ../examples/donutdrilldown/widget.cpp 1
10 \snippet ../examples/donutbreakdown/widget.cpp 1
11
11
12 PieSeries is used to present the general data.
12 PieSeries is used to present the general data.
13
13
14 \snippet ../examples/donutdrilldown/widget.cpp 2
14 \snippet ../examples/donutbreakdown/widget.cpp 2
15
15
16 Following block of code creates the slices for the mainData QPieSeries.
16 Following block of code creates the slices for the mainData QPieSeries.
17 Then for every created slice a new series is created that stores the detailed data.
17 Then for every created slice a new series is created that stores the detailed data.
18 The details series is set to be a donut. Its size is adjusted so that it wraps around the mainData pie.
18 The details series is set to be a donut. Its size is adjusted so that it wraps around the mainData pie.
19 Next two signals from the mainData pie's slices are connected. This is used to keep the mainData slices agligned with their respective details series.
19 Next two signals from the mainData pie's slices are connected. This is used to keep the mainData slices agligned with their respective details series.
20
20
21 \snippet ../examples/donutdrilldown/widget.cpp 3
21 \snippet ../examples/donutbreakdown/widget.cpp 3
22
22
23 Set the labels of the mainData to enabled and their postion to Outside.
23 Set the labels of the mainData to enabled and their postion to Outside.
24 Then add the mainData and detailedData series to the chart.
24 Then add the mainData and detailedData series to the chart.
25
25
26 \snippet ../examples/donutdrilldown/widget.cpp 4
26 \snippet ../examples/donutbreakdown/widget.cpp 4
27
27
28 Finally the widget is placed in a layout used by the application.
28 Finally the widget is placed in a layout used by the application.
29
29
30 \snippet ../examples/donutdrilldown/widget.cpp 5
30 \snippet ../examples/donutbreakdown/widget.cpp 5
31
31
32 To show that the detailed data stays aligned with the main data every 2.5 sec. one of the slices is modified.
32 To show that the detailed data stays aligned with the main data every 2.5 sec. one of the slices is modified.
33 It should be noted that int this example the mainData slices should not be modified directly as the change
33 It should be noted that int this example the mainData slices should not be modified directly as the change
34 cannot be applied to the detailed slices without the extra knowledge on how the split looks like.
34 cannot be applied to the detailed slices without the extra knowledge on how the split looks like.
35
35
36 \snippet ../examples/donutdrilldown/widget.cpp 6
36 \snippet ../examples/donutbreakdown/widget.cpp 6
37
37
38 When the mainData slice layout is changed the detailed data layout has to be modified accordingly.
38 When the mainData slice layout is changed the detailed data layout has to be modified accordingly.
39 This is achived by setting the start and end angle of the detailed series.
39 This is achived by setting the start and end angle of the detailed series.
40
40
41 \snippet ../examples/donutdrilldown/widget.cpp 7
41 \snippet ../examples/donutbreakdown/widget.cpp 7
42
42
43 Highlight slot selects a random slice for the modification.
43 Highlight slot selects a random slice for the modification.
44 The slice is set to exploded to notify the user that its going to be changed.
44 The slice is set to exploded to notify the user that its going to be changed.
@@ -47,6 +47,6
47 Then the slice is modified. Respective mainData slice is modified as well to contain as the value the sum of the detailed series slices values.
47 Then the slice is modified. Respective mainData slice is modified as well to contain as the value the sum of the detailed series slices values.
48 Finally the slice exploded state is set to false.
48 Finally the slice exploded state is set to false.
49
49
50 \snippet ../examples/donutdrilldown/widget.cpp 8
50 \snippet ../examples/donutbreakdown/widget.cpp 8
51
51
52 */
52 */
@@ -28,7 +28,7
28 <li><a href="examples-piechart.html">Pie chart</a></li>
28 <li><a href="examples-piechart.html">Pie chart</a></li>
29 <li><a href="examples-piechartdrilldown.html">Pie chart drilldown</a></li>
29 <li><a href="examples-piechartdrilldown.html">Pie chart drilldown</a></li>
30 <li><a href="examples-donut.html">Donut chart</a></li>
30 <li><a href="examples-donut.html">Donut chart</a></li>
31 <li><a href="examples-donutdrilldown.html">Donut chart drilldown</a></li>
31 <li><a href="examples-donutbreakdown.html">Donut chart drilldown</a></li>
32 <li><a href="examples-presenterchart.html">Presenter chart</a></li>
32 <li><a href="examples-presenterchart.html">Presenter chart</a></li>
33 <li><a href="examples-scatterchart.html">Scatter chart</a></li>
33 <li><a href="examples-scatterchart.html">Scatter chart</a></li>
34 <li><a href="examples-scatterinteractions.html">Scatter interactions</a></li>
34 <li><a href="examples-scatterinteractions.html">Scatter interactions</a></li>
@@ -2,7 +2,7
2 error( "Couldn't find the examples.pri file!" )
2 error( "Couldn't find the examples.pri file!" )
3 }
3 }
4
4
5 TARGET = donutdrilldown
5 TARGET = donutbreakdown
6 SOURCES += main.cpp\
6 SOURCES += main.cpp\
7 widget.cpp
7 widget.cpp
8
8
1 NO CONTENT: file renamed from examples/donutdrilldown/main.cpp to examples/donutbreakdown/main.cpp
NO CONTENT: file renamed from examples/donutdrilldown/main.cpp to examples/donutbreakdown/main.cpp
1 NO CONTENT: file renamed from examples/donutdrilldown/widget.cpp to examples/donutbreakdown/widget.cpp
NO CONTENT: file renamed from examples/donutdrilldown/widget.cpp to examples/donutbreakdown/widget.cpp
1 NO CONTENT: file renamed from examples/donutdrilldown/widget.h to examples/donutbreakdown/widget.h
NO CONTENT: file renamed from examples/donutdrilldown/widget.h to examples/donutbreakdown/widget.h
@@ -28,6 +28,6 SUBDIRS += \
28 horizontalstackedbarchart \
28 horizontalstackedbarchart \
29 horizontalpercentbarchart \
29 horizontalpercentbarchart \
30 donut \
30 donut \
31 donutdrilldown \
31 donutbreakdown \
32 scrollchart \
32 scrollchart \
33 datetimeaxis
33 datetimeaxis
General Comments 0
You need to be logged in to leave comments. Login now