Packageardisia.charts.legend
Classpublic class Legend
InheritanceLegend Inheritance spark.components.SkinnableDataContainer

Base class for legends designed for use with Ardisia charts. Currently, this includes the DonutChart, RadarChart, and the Funnel chart.

Item renderers are expected to implement ILegendRendererInterface.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
  allowDeselection : Boolean
True if users can remove series from the associated chart by toggling items in the legend.
Legend
  chart : ChartBase
The chart to create a legend for.
Legend
  enableHoverTrigger : Boolean = true
True if hovering over a renderer will trigger a hover effect over the relevant series in the Chart.
Legend
Protected Properties
 PropertyDefined By
  collection : ArrayCollection
Collection used internally.
Legend
Public Methods
 MethodDefined By
  
update():void
Updates the legend based on the chart set via the dataProvider property.
Legend
  
updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void
[override]
Legend
Protected Methods
 MethodDefined By
  
[override]
Legend
  
[override]
Legend
  
eventHandler(event:Event):void
Handles events for this component.
Legend
  
Filter the dataProvider of the chart based on the selected series in the Legend.
Legend
  
partAdded(partName:String, instance:Object):void
[override]
Legend
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override]
Legend
Property Detail
allowDeselectionproperty
allowDeselection:Boolean

True if users can remove series from the associated chart by toggling items in the legend.

The default value is true.


Implementation
    public function get allowDeselection():Boolean
    public function set allowDeselection(value:Boolean):void
chartproperty 
chart:ChartBase

The chart to create a legend for.

The default value is null.


Implementation
    public function get chart():ChartBase
    public function set chart(value:ChartBase):void
collectionproperty 
protected var collection:ArrayCollection

Collection used internally.

enableHoverTriggerproperty 
public var enableHoverTrigger:Boolean = true

True if hovering over a renderer will trigger a hover effect over the relevant series in the Chart.

The default value is true.

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 events for this component.

Parameters

event:Event — Event

filterChart()method 
protected function filterChart():void

Filter the dataProvider of the chart based on the selected series in the Legend.

partAdded()method 
override protected function partAdded(partName:String, instance:Object):void

Parameters

partName:String
 
instance:Object

update()method 
public function update():void

Updates the legend based on the chart set via the dataProvider property.

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

Parameters

unscaledWidth:Number
 
unscaledHeight:Number

updateRenderer()method 
override public function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void

Parameters

renderer:IVisualElement
 
itemIndex:int
 
data:Object