YUI AS Component Documentation | All Packages | All Classes | Index | Frames No Frames |
Class PieSeries

Package | com.yahoo.astra.fl.charts.series
Class | public class PieSeries
Inheritance | PieSeries Series fl.core.UIComponent
Implements | ICategorySeries

Renders data points as a series of pie-like wedges.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | categoryField : String The field used to access categories for this series. | PieSeries
|  | categoryNames : Array The names of the categories displayed on the category axis. | PieSeries
|  | chart : Object The chart in which this series appears. | Series
|  | dataField : String The field used to access data for this series. | PieSeries
|  | dataProvider : Object The data provider for this series. | Series
|  | dataTipFunction : Function DataTip Function for series | Series
|  | displayName : String The name of the series as it appears to the user. | Series
|  | itemRenderer : Object The class used to instantiate item renderers. | Series
|  | labelFunction : Function A function may be set to determine the text value of the labels. | PieSeries
|  | legendLabelFunction : Function If defined, the chart will call the input function to determine the text displayed in in the chart's legend. | Series
|  | length : int The number of items in the series. | Series

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined by
--- | --- | ---
|  | PieSeries(data:Object = null) Constructor. | PieSeries
|  | clone():ISeries Creates a copy of the ISeries object. | PieSeries
|  | createLegendItemData():Array Creates an Array of LegendItemData objects to pass to the chart's legend. | PieSeries
|  | itemRendererToIndex(renderer:ISeriesItemRenderer):int Returns the index of an item renderer. | Series
|  | itemToCategory(item:Object, index:int):String Converts an item to the category in which it is displayed. | PieSeries
|  | itemToData(item:Object):Number Converts an item to it's value. | PieSeries
|  | itemToItemRenderer(item:Object):ISeriesItemRenderer Converts an item to its corresponding item renderer. | Series
|  | itemToPercentage(item:Object):Number Converts an item's value to its percentage equivilent. | PieSeries

Protected Methods
Hide Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined by
--- | --- | ---
|  | copyStylesToRenderer(child:ISeriesItemRenderer, styleMap:Object):void Copies a styles from the series to a child through a style map. | PieSeries
|  | invalidateMarker(marker:ISeriesItemRenderer):void Invalidates a marker (considered new). | Series
|  | isMarkerInvalid(marker:ISeriesItemRenderer):Boolean Indicates whether special considerations should be taken for a newly created marker. | Series
|  | validateMarker(marker:ISeriesItemRenderer):void Makes a marker valid. | Series

Styles
Hide Inherited Styles
Show Inherited Styles

| Style | Description | Defined by
--- | --- | --- | ---
|  | animationDuration | Type: int The duration for animations that occur on data changes. | Series
|  | animationEasingFunction | Type: Function The easing function for animations that occur on data changes. | Series
|  | animationEnabled | Type: Boolean If true, data changes will be displayed with animations. | Series
|  | borderAlpha | Type: Number The alpha value from 0.0 to 1.0 to use for drawing the border of markers. | Series
|  | borderColor | Type: uint The border color used by programatic skins in this series. | Series
|  | color | Type: uint The base color used by objects displayed in this series. | Series
|  | fillAlpha | Type: Number The alpha value from 0.0 to 1.0 to use for drawing the fills of markers. | Series
|  | fillColor | Type: uint The fill color used by programatic skins in this series. | Series
|  | fillColors | Type: Array The colors of the markers in this series. The default value is `[0x729fcf, 0xfcaf3e, 0x73d216, 0xfce94f, 0xad7fa8, 0x3465a4]`. | PieSeries
|  | hideOverlappingLabels | Type: Boolean If true, marker labels that overlap previously-created labels will be hidden to improve readability. The default value is `true`. | PieSeries
|  | markerAlpha | Type: Number The alpha value from 0.0 to 1.0 to use for drawing the markers. | Series
|  | markerSize | Type: Number The size, in pixels, of each marker. | Series
|  | markerSkin | Type: Class The Class used to instantiate each marker's skin. | Series
|  | showLabels | Type: Boolean If true, a label is displayed on each marker. The label text is created with the labelFunction property of the series. The default label function sets the label to the percentage value of the item. The default value is `false`. | PieSeries

Property detail

categoryField | property

`categoryField:String` [read-write]

The field used to access categories for this series.

Implementation
`public function get categoryField():String`
`public function set categoryField(value:String):void`

categoryNames | property |

`categoryNames:Array` [read-write]

The names of the categories displayed on the category axis. If the chart does not have a category axis, this value will be ignored.

Implementation
`public function get categoryNames():Array`
`public function set categoryNames(value:Array):void`

dataField | property |

`dataField:String` [read-write]

The field used to access data for this series.

Implementation
`public function get dataField():String`
`public function set dataField(value:String):void`

labelFunction | property |

`labelFunction:Function` [read-write]

A function may be set to determine the text value of the labels.

    function labelFunction(item:Object):String

Implementation
`public function get labelFunction():Function`
`public function set labelFunction(value:Function):void`
Constructor detail

PieSeries | () | constructor

`public function PieSeries(data:Object = null)`

Constructor.

Parameters

| `data:Object` (default = `null`)``

Method detail

clone | () | method

`public override function clone():ISeries`

Creates a copy of the ISeries object.

Returns

| `ISeries` — a new ISeries object

copyStylesToRenderer | () | method |

`protected function copyStylesToRenderer(child:ISeriesItemRenderer, styleMap:Object):void`

Copies a styles from the series to a child through a style map.

Parameters

| `child:ISeriesItemRenderer`
| `styleMap:Object`

See also

copyStylesToChild()

createLegendItemData | () | method |

`public function createLegendItemData():Array`

Creates an Array of LegendItemData objects to pass to the chart's legend.

Returns

| `Array`

itemToCategory | () | method |

`public function itemToCategory(item:Object, index:int):String`

Converts an item to the category in which it is displayed.

Parameters

| `item:Object`
| `index:int`

Returns

| `String`

itemToData | () | method |

`public function itemToData(item:Object):Number`

Converts an item to it's value.

Parameters

| `item:Object`

Returns

| `Number`

itemToPercentage | () | method |

`public function itemToPercentage(item:Object):Number`

Converts an item's value to its percentage equivilent.

Parameters

| `item:Object`

Returns

| `Number`