AMT Help Files

Pie Chart

A pie chart consists of a circle with colored parts as shown in the example below. A possible legend can be added be setting the Legend property of the chart to True in the Object Inspector.



Data displayed



A pie chart can be used to display only one data set, in LION called a series. The data to display can be entered using the series1.add () command with the following syntax.

<PieChartObject>.series[1].add (<weight>, <color>, <legendText>)

Where:

The data set can be cleared by using the <PieChartObject>.series[1].clear () command.


Code example



The chart shown above was created using the following code:

chart_pie.series[1].add (10clblack'Norm')
chart_pie.series[1].add (20, $004080'Twice')
chart_pie.series[1].add (30clred'Thrice')
chart_pie.series[1].add (40, $0080FF'Four times')
chart_pie.series[1].add (50clyellow'Five times')
chart_pie.series[1].add (60clgreen'Six times')

Properties

Static properties:
Shown are only the properties to be used for pie charts. The property ChartKind should be set to Pie for a pie chart. 

 

Dynamic properties:

 

Legacy properties (not supported):