Packageflexlib.charts
Classpublic class DraggablePie
InheritanceDraggablePie Inheritance mx.core.UIComponent

The DraggablePie is used to allow users of your application to drag around the pie slices in a pie chart. The chart allows you to set a data provider that implements the ICollectionView interface. It provides styles for its own "tooltips" as well as the typical font styles and disabled styles. The chart is useable from MXML or from AS3.



Public Properties
 PropertyDefined By
  colorField : String
Used to determine which field on the objects in the data provider is the field that contains the color to be used when drawing the pie slice.
DraggablePie
  dataField : String
Used to determine which field on the objects in the data provider is the field that contains the data.
DraggablePie
  dataProvider : Object
The dataProvider is used to control what data the chart will draw.
DraggablePie
  labelField : String
Used to determine which field on the objects in the data provider is the field that contains the label to be used on the tooltips.
DraggablePie
  liveDragging : Boolean
Determines whether or not to dispatch change events as the mouse moves or just when the mouse is released
DraggablePie
  numDecimals : Number
Number of decimals to show in tooltip
DraggablePie
  percentRadius : Number
The percent radius is used to figure out how large the radius should be.
DraggablePie
  sensitivityAngle : Number
Used to determine how much leeway to give when clicking on a line or not.
DraggablePie
  tooltipTextFunction : Function
Used to replace tooltip text without sub-classing the object.
DraggablePie
Protected Properties
 PropertyDefined By
  angles : Array
An ordered array of the angles of all edges in the pie chart
DraggablePie
Public Methods
 MethodDefined By
  
DraggablePie
  
styleChanged(styleProp:String):void
[override]
DraggablePie
Protected Methods
 MethodDefined By
  
[override]
DraggablePie
  
createTooltip(series:Object):IToolTip
This method creates a tooltip blurb for the series specified.
DraggablePie
  
getTooltipTextForSeries(series:Object):String
This function returns a string to be displayed by a tooltip for a particular data object.
DraggablePie
  
hideCursor():void
This function hides the finger cursor when the user is hovering over an edge.
DraggablePie
  
showCursor():void
This function shows a finger cursor when the user is hovering over an edge.
DraggablePie
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override]
DraggablePie
Events
 Event Summary Defined By
  Dispatched when the data changes according to the .DraggablePie
Styles
 Style Description Defined By
  
disabledAlpha
Type: Number CSS Inheritance: no
Defines the alpha to use for the pie chart when the chart is disabled The default value is 0.5.
DraggablePie
  
disabledLineColor
Type: uint CSS Inheritance: no
Defines the color to use for the lines on the pie chart when the chart is disabled The default value is 0xAAAAAA.
DraggablePie
  
lineColor
Type: uint CSS Inheritance: no
Defines the color to use for the lines on the pie chart The default value is 0x333333.
DraggablePie
Property Detail
anglesproperty
protected var angles:Array

An ordered array of the angles of all edges in the pie chart

colorFieldproperty 
colorField:String

Used to determine which field on the objects in the data provider is the field that contains the color to be used when drawing the pie slice.

The default value is "color".

This property can be used as the source for data binding.


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

Used to determine which field on the objects in the data provider is the field that contains the data.

The default value is "data".

This property can be used as the source for data binding.


Implementation
    public function get dataField():String
    public function set dataField(value:String):void
dataProviderproperty 
dataProvider:Object

The dataProvider is used to control what data the chart will draw. Each object in it represents a pie slice. It is internally casted to type ICollectionView. If you pass an Array it will be convered to an ArrayCollection. If you pass an Object it is converted to an ArrayCollection with the object as the first element

This property can be used as the source for data binding.


Implementation
    public function get dataProvider():Object
    public function set dataProvider(value:Object):void
labelFieldproperty 
labelField:String

Used to determine which field on the objects in the data provider is the field that contains the label to be used on the tooltips.

The default value is "label".

This property can be used as the source for data binding.


Implementation
    public function get labelField():String
    public function set labelField(value:String):void
liveDraggingproperty 
liveDragging:Boolean

Determines whether or not to dispatch change events as the mouse moves or just when the mouse is released

The default value is true.

This property can be used as the source for data binding.


Implementation
    public function get liveDragging():Boolean
    public function set liveDragging(value:Boolean):void
numDecimalsproperty 
numDecimals:Number

Number of decimals to show in tooltip

The default value is 2.

This property can be used as the source for data binding.


Implementation
    public function get numDecimals():Number
    public function set numDecimals(value:Number):void
percentRadiusproperty 
percentRadius:Number

The percent radius is used to figure out how large the radius should be. The value 100% uses the the minimum of the width or the height divided by 2

The default value is 100.

This property can be used as the source for data binding.


Implementation
    public function get percentRadius():Number
    public function set percentRadius(value:Number):void
sensitivityAngleproperty 
sensitivityAngle:Number

Used to determine how much leeway to give when clicking on a line or not. The angle is expressed in radians.

The default value is 5 Degrees.

This property can be used as the source for data binding.


Implementation
    public function get sensitivityAngle():Number
    public function set sensitivityAngle(value:Number):void
tooltipTextFunctionproperty 
tooltipTextFunction:Function

Used to replace tooltip text without sub-classing the object. Function must be of signature function(series:Object):String This function will override the numDecimals property.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get tooltipTextFunction():Function
    public function set tooltipTextFunction(value:Function):void
Constructor Detail
DraggablePie()Constructor
public function DraggablePie()

Method Detail
commitProperties()method
override protected function commitProperties():void

createTooltip()method 
protected function createTooltip(series:Object):IToolTip

This method creates a tooltip blurb for the series specified.

Parameters

series:Object — The data object to make the tooltip for.

Returns
IToolTip — ITooltip The tooltip which was created.
getTooltipTextForSeries()method 
protected function getTooltipTextForSeries(series:Object):String

This function returns a string to be displayed by a tooltip for a particular data object.

Parameters

series:Object — The object to create the tooltip text for

Returns
String
hideCursor()method 
protected function hideCursor():void

This function hides the finger cursor when the user is hovering over an edge.

showCursor()method 
protected function showCursor():void

This function shows a finger cursor when the user is hovering over an edge.

styleChanged()method 
override public function styleChanged(styleProp:String):void

Parameters

styleProp:String

updateDisplayList()method 
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

Parameters

unscaledWidth:Number
 
unscaledHeight:Number

Event Detail
change Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.CHANGE

Dispatched when the data changes according to the . <codeph>liveDragging</codeph> property.