The PieChartData record describes the sections within a
pie chart. Code a PieChartData record for each section of the pie
chart.
Properties
- color
- The color that is associated with the section of the chart that
you are defining
- fontColor
- The color of the font for the text label
- text
- The text that is to be placed inside the section
- y
- The numeric value that was used to calculate the amount of space
this data record occupies in the chart related to the other data records.
Example
The following example shows the
code and output for a pie chart that contains four sections. A PieChartData
record defines each section.
DojoPieChart {radius=100,width="300",height="300",
labelOffset=50,fontColor="black",
data = [
new PieChartData{ y=1, text="SUVs",color="green"},
new PieChartData{ y=2, text="sedans",color="yellow"},
new PieChartData{ y=2, text="hybrids",color="#3300FF"},
new PieChartData{ y=2, text="hatchbacks",color="#9900FF"}]
}