| Package | ardisia.charts.donut |
| Class | public class Donut |
| Inheritance | Donut ChartBase spark.components.supportClasses.SkinnableComponent |
View the technical documentation on the Ardisia Labs website for more information.
Default MXML PropertydataProvider
| Property | Defined By | ||
|---|---|---|---|
| angleOffset : Number
Angle at which to begin drawing the rings. | Donut | ||
| categories : Vector.<DonutCategory>
A vector of the field(s) on the data that defines the category value(s). | Donut | ||
![]() | colorField : String
Field name on the data to pull the node's color. | ChartBase | |
![]() | colorFormatFunction : Function
User provided function that returns the color for the series when
passed the series data object. | ChartBase | |
![]() | dataProvider : ListCollectionView
The dataProvider for the chart. | ChartBase | |
![]() | dataTipField : String
Field name on the data to pull the node's data tip string. | ChartBase | |
![]() | dataTipFormatFunction : Function
User provided function that gets the message to display with the
data tip. | ChartBase | |
![]() | dataTipHideDelay : Number = 350
Delay before the data tip is hidden. | ChartBase | |
![]() | dataTipInstance : IDataRenderer
Instance of the data tip. | ChartBase | |
![]() | excludedSeries : Array
Array of the series that should not be displayed. | ChartBase | |
![]() | highlightAlpha : Number = 0.4
When series data is highlighted, the alpha to apply. | ChartBase | |
![]() | highlightDuration : Number = 250
Duration of the highlight effects. | ChartBase | |
| _hoveredCategoryIndex : int | Donut | ||
| hoveredCategoryIndex : int [read-only]
Category index of a renderer that is currently hovered. | Donut | ||
| innerRadius : Number
The inner radius before drawing the rings. | Donut | ||
| ringSeparation : Number
Separation in pixels between different rings. | Donut | ||
| seriesField : String
The field on the data that defines the series value. | Donut | ||
| seriesLabelOffset : Number
The number of pixels to offset the axis labels radially from the ends
of the category axes. | Donut | ||
![]() | showDataTip : Boolean = true
True to display a data tip on hover. | ChartBase | |
| showPercentages : Boolean
Display the percentage of each slice in a label. | Donut | ||
| showSeriesLabels : Boolean
Display the labels for the series. | Donut | ||
| wedgeSeperation : Number
Separation in pixels between different wedges. | Donut | ||
| Property | Defined By | ||
|---|---|---|---|
![]() | numberFormatter : NumberFormatter
Default number formatter. | ChartBase | |
| wedgeRenderers : Vector.<DonutRenderer>
Vector of renderers for the wedges. | Donut | ||
| Method | Defined By | ||
|---|---|---|---|
getColor(item:Object):uint
Returns the color for each series. | Donut | ||
![]() | hideDataTip():void
Hide the data tip. | ChartBase | |
setHighlightedSeries(item:Object):void [override]
Highlight the passed series. | Donut | ||
| Method | Defined By | ||
|---|---|---|---|
eventHandler(event:Event):void [override]
Handles the events for the class. | Donut | ||
formatPercentLabelsText(value:Number):String
Return formatted string to display for the percentage labels. | Donut | ||
getDataTipContent(data:Object):Object [override]
Returns the contents for the data tip. | Donut | ||
![]() | setupDataTip(data:Object):void
Setup the data tip. | ChartBase | |
![]() | updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void [override]
| ChartBase | |
This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.
| Skin Part | Description | Defined By | ||
|---|---|---|---|---|
![]() | dataTipFactoryPart:mx.core.IFactory | Required: false Part Type: Dynamic Displays the data tip when a node is hovered. The IFactory must return an object of type IDataRenderer | ChartBase | |
percentagesLabelFactoryPart:mx.core.IFactory | Required: false Part Type: Dynamic Creates and displays the percentage for each wedge. The IFactory must return an object of type Label | Donut | ||
seriesLabelFactoryPart:mx.core.IFactory | Required: false Part Type: Dynamic Creates and displays the labels for the series. The IFactory must return an object of type Label | Donut | ||
![]() | Required: false Part Type: Dynamic Container for the content added to the skin. | ChartBase | ||
To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.
| _hoveredCategoryIndex | property |
public var _hoveredCategoryIndex:int| angleOffset | property |
angleOffset:NumberAngle at which to begin drawing the rings.
The default value is 0.
public function get angleOffset():Number public function set angleOffset(value:Number):void| categories | property |
categories:Vector.<DonutCategory>A vector of the field(s) on the data that defines the category value(s).
The default value is null.
public function get categories():Vector.<DonutCategory> public function set categories(value:Vector.<DonutCategory>):void| hoveredCategoryIndex | property |
hoveredCategoryIndex:int [read-only] Category index of a renderer that is currently hovered.
Useful to style the dataTip.
The default value is -1.
public function get hoveredCategoryIndex():int| innerRadius | property |
innerRadius:NumberThe inner radius before drawing the rings.
The default value is 20.
public function get innerRadius():Number public function set innerRadius(value:Number):void| ringSeparation | property |
ringSeparation:NumberSeparation in pixels between different rings. Only applicable if multiple categoryFields are defined.
The default value is 4.
public function get ringSeparation():Number public function set ringSeparation(value:Number):void| seriesField | property |
seriesField:StringThe field on the data that defines the series value.
The default value is "".
public function get seriesField():String public function set seriesField(value:String):void| seriesLabelOffset | property |
seriesLabelOffset:NumberThe number of pixels to offset the axis labels radially from the ends of the category axes.
The default value is 5.
public function get seriesLabelOffset():Number public function set seriesLabelOffset(value:Number):void| showPercentages | property |
showPercentages:BooleanDisplay the percentage of each slice in a label.
The default value is false.
public function get showPercentages():Boolean public function set showPercentages(value:Boolean):void| showSeriesLabels | property |
showSeriesLabels:BooleanDisplay the labels for the series.
The default value is true.
public function get showSeriesLabels():Boolean public function set showSeriesLabels(value:Boolean):void| wedgeRenderers | property |
protected var wedgeRenderers:Vector.<DonutRenderer>Vector of renderers for the wedges.
| wedgeSeperation | property |
wedgeSeperation:NumberSeparation in pixels between different wedges.
The default value is 2.
public function get wedgeSeperation():Number public function set wedgeSeperation(value:Number):void| eventHandler | () | method |
override protected function eventHandler(event:Event):voidHandles the events for the class.
Parameters
event:Event — the Event that triggered the handler
|
| formatPercentLabelsText | () | method |
protected function formatPercentLabelsText(value:Number):StringReturn formatted string to display for the percentage labels.
Parameters
value:Number — the Number to format
|
String — a formatted String
|
| getColor | () | method |
public function getColor(item:Object):uintReturns the color for each series. First applies the color via the colorFormatFunction, next uses an optional colorField, and finally uses a default coloring scheme.
The function has the following signature:
funcName(index:int):uint
Parameters
item:Object |
uint |
| getDataTipContent | () | method |
override protected function getDataTipContent(data:Object):ObjectReturns the contents for the data tip. Uses the "dataTipField" first, then the "dataTipFormatFunction" function, then the class default.
Can return a TextFlow or a String.
Parameters
data:Object — Object
|
Object — Object
|
| setHighlightedSeries | () | method |
override public function setHighlightedSeries(item:Object):voidHighlight the passed series.
Pass a null value to remove any applied effects.
Parameters
item:Object — Object
|