Important version information!

You are browsing a class reference for Version 2 of the JavaScript Charts. If you are using Version 3 (current), please click here.

Slice

Slice is an item of AmPieChart's chartData Array and holds all the information about the slice. When working with a pie chart, you do not create slices or change it's properties directly, instead you set array of data using dataProvider property. Consider properties of a Slice read-only - change values in chart's data provider if you need to.

Properties

PropertyTypeDefaultDescription
alphaNumberOpacity of a slice.
colorStringColor of a slice.
dataContextObjectOriginal object from data provider.
descriptionStringSlice description.
hiddenBooleanSpecifies whether the slice is hidden
percentsNumberPercent value of a slice.
pulledBooleanSpecifies whether the slice is pulled or not.
titleStringSlice title
urlStringUrl of a slice
valueNumberValue of a slice
visibleInLegendBooleanspecifies whether this slice has a legend entry

Methods

Slice class does not have any methods.

Events

Slice class does not have any events.