
This example demonstrates a donut chart. It also demonstrates other chart effects, such as using CDML to nicely format sector labels, silver background color, rounded corners, and glass shading effect for title and sector labels.
- A donut chart is the same as a pie chart, except that the PieChart.setDonutSize is used instead of PieChart.setPieSize.
- The silver background is achieved by using silverColor to create the silver color, then use PieChart.PieChart to set it as the chart background color.
- The rounded frame is configured using BaseChart.setRoundedFrame.
- The glass shading effect of the title is defined using glassEffect, then applied to the title using Box.setBackground of the title TextBox object.
- The glass shading effect of the sector labels is defined using glassEffect, then applied to the sector labels using Box.setBackground of the sector label prototype object (obtained via PieChart.setLabelStyle).
- The rounded corners of the sector labels are configured using Box.setRoundedCorners of the sector label prototype object.