Packageardisia.charts.sparklines
Classpublic class SparklinePie
InheritanceSparklinePie Inheritance spark.components.Group

Small pie chart designed for inline data grid use.

View the technical documentation on the Ardisia Labs website for more information.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
  dataProvider : IList
The dataProvider for the chart.
SparklinePie
  dataTipDefaultPrecision : Number = 2
Default numerical precision for the number formatter if a dataTipFormatFunction or dataTipField is not provided.
SparklinePie
  dataTipField : String
Field name on the data to pull the node's data tip string.
SparklinePie
  dataTipFormatFunction : Function
User provided function that gets the message to display with the data tip.
SparklinePie
  dataTipHideDelay : Number = 250
Delay before the data tip is hidden.
SparklinePie
  dataTipInstance : DataTip
Instance of the data tip.
SparklinePie
  seriesField : String
The field on the data that defines the series value.
SparklinePie
  showDataTip : Boolean = true
True to display a data tip on hover.
SparklinePie
Public Methods
 MethodDefined By
  
SparklinePie
  
Hide the data tip.
SparklinePie
Protected Methods
 MethodDefined By
  
[override]
SparklinePie
  
[override]
SparklinePie
  
eventHandler(event:Event):void
Handles the events for the class.
SparklinePie
  
getDataTipContent(item:Object):Object
Returns the contents for the data tip.
SparklinePie
  
Processes the data provider and gets the required values necessary for display.
SparklinePie
  
setupDataTip(data:Object):void
Setup the data tip.
SparklinePie
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override]
SparklinePie
Styles
 Style Description Defined By
  
backgroundAlpha
Type: Number CSS Inheritance: no
The alpha of the background. The default value is 1.
SparklinePie
  
backgroundColor
Type: uint Format: Color CSS Inheritance: no
The color of the background. The default value is #FFFFFF.
SparklinePie
  
defaultColor
Type: uint Format: Color CSS Inheritance: no
The default color for wedges. #BBBBBB
SparklinePie
  
minMaxColor
Type: uint Format: Color CSS Inheritance: no
The displayed color for the minimum and maximum value data points. The default value is #0099FF.
SparklinePie
Property Detail
dataProviderproperty
dataProvider:IList

The dataProvider for the chart. This property is bindable and is bound to "dataProviderChanged" events.

The default value is null.

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


Implementation
    public function get dataProvider():IList
    public function set dataProvider(value:IList):void
dataTipDefaultPrecisionproperty 
public var dataTipDefaultPrecision:Number = 2

Default numerical precision for the number formatter if a dataTipFormatFunction or dataTipField is not provided.

The default value is 2.

dataTipFieldproperty 
public var dataTipField:String

Field name on the data to pull the node's data tip string.

If neither this property nor "dataTipFormatFunction" are defined, the tip will display the raw series value.

The default value is "".

dataTipFormatFunctionproperty 
public var dataTipFormatFunction:Function

User provided function that gets the message to display with the data tip. The function takes a data object and returns either a TextFlow or a String for the data tip contents.

The function has the following signature:

	  funcName(value:Object):Object
	  

The default value is null.

dataTipHideDelayproperty 
public var dataTipHideDelay:Number = 250

Delay before the data tip is hidden.

The default value is 250.

dataTipInstanceproperty 
public var dataTipInstance:DataTip

Instance of the data tip.

The default value is DataTip.

seriesFieldproperty 
seriesField:String

The field on the data that defines the series value.

The default value is "".


Implementation
    public function get seriesField():String
    public function set seriesField(value:String):void
showDataTipproperty 
public var showDataTip:Boolean = true

True to display a data tip on hover.

The default value is true.

Constructor Detail
SparklinePie()Constructor
public function SparklinePie()



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

createChildren()method 
override protected function createChildren():void

eventHandler()method 
protected function eventHandler(event:Event):void

Handles the events for the class.

Parameters

event:Event — the Event that triggered the handler

getDataTipContent()method 
protected function getDataTipContent(item:Object):Object

Returns 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

item:Object — Object

Returns
Object — Object
hideDataTip()method 
public function hideDataTip():void

Hide the data tip.

processDataProvider()method 
protected function processDataProvider():void

Processes the data provider and gets the required values necessary for display.

setupDataTip()method 
protected function setupDataTip(data:Object):void

Setup the data tip. Must be positioned elsewhere.

Parameters

data:Object — Object the data to setup the content of the data tip

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

Parameters

unscaledWidth:Number
 
unscaledHeight:Number