| Package | ardisia.charts.legend |
| Class | public class Legend |
| Inheritance | Legend spark.components.SkinnableDataContainer |
Item renderers are expected to implement ILegendRendererInterface.
Default MXML PropertydataProvider
| Property | Defined 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 | ||
| Property | Defined By | ||
|---|---|---|---|
| collection : ArrayCollection
Collection used internally. | Legend | ||
| Method | Defined 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 | ||
| Method | Defined By | ||
|---|---|---|---|
commitProperties():void [override]
| Legend | ||
createChildren():void [override]
| Legend | ||
eventHandler(event:Event):void
Handles events for this component. | Legend | ||
filterChart():void
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 | ||
| allowDeselection | property |
allowDeselection:BooleanTrue if users can remove series from the associated chart by toggling items in the legend.
The default value is true.
public function get allowDeselection():Boolean public function set allowDeselection(value:Boolean):void| chart | property |
chart:ChartBaseThe chart to create a legend for.
The default value is null.
public function get chart():ChartBase public function set chart(value:ChartBase):void| collection | property |
protected var collection:ArrayCollectionCollection used internally.
| enableHoverTrigger | property |
public var enableHoverTrigger:Boolean = trueTrue if hovering over a renderer will trigger a hover effect over the relevant series in the Chart.
The default value is true.
| commitProperties | () | method |
override protected function commitProperties():void
| createChildren | () | method |
override protected function createChildren():void
| eventHandler | () | method |
protected function eventHandler(event:Event):voidHandles events for this component.
Parameters
event:Event — Event
|
| filterChart | () | method |
protected function filterChart():voidFilter 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():voidUpdates 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 |