YUI Flash Component Documentation | All Packages | All Classes | Index | Frames No Frames |
Class Charts

Package | Top Level
Class | public class Charts
Inheritance | Charts YUIAdapter flash.display.Sprite

A wrapper for the Astra Charts components to allow them to be used by the YUI library.

Public Properties

| Property | Defined by
--- | --- | ---
|  | legendDisplay : String | Charts
|  | padding : Number | Charts
|  | spacing : Number | Charts

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined by
--- | --- | ---
|  | elementID : String The element id that references the SWF in the HTML. | YUIAdapter
|  | javaScriptEventHandler : String The globally accessible JavaScript function that accepts events through ExternalInterface. | YUIAdapter
|  | legend : Legend | Charts
|  | _legendDisplay : String = "none" | Charts
|  | _padding : Number = 10 | Charts
|  | _spacing : Number = 6 | Charts

Public Methods

| Method | Defined by
--- | --- | ---
|  | Charts() Constructor. | Charts
|  | getCategoryField():String Returns the field used in complex objects to access categories to be displayed on the PieChart. | Charts
|  | getCategoryNames():Array Returns the category names. | Charts
|  | getDataField():String Returns the field used in complex objects to access data to be displayed on the PieChart. | Charts
|  | getHorizontalAxisTitle():String Returns the title displayed next to the vertical axis. | Charts
|  | getHorizontalField():String Returns the field used in complex objects to access data to be displayed on the horizontal axis. | Charts
|  | getVerticalAxisTitle():String Returns the title displayed next to the vertical axis. | Charts
|  | getVerticalField():String Returns the field used in complex objects to access data to be displayed on the vertical axis. | Charts
|  | setCategoryField(value:String):void Sets the field used in complex objects to access categories to be displayed on the PieChart. | Charts
|  | setCategoryNames(value:Array):void Sets the category names used if the data requires a category axis. | Charts
|  | setDataField(value:String):void Sets the field used in complex objects to access data to be displayed on the PieChart. | Charts
|  | setDataProvider(value:Array, styleChanged:Boolean = false):void | Charts
|  | setDataTipFunction(value:String):void Sets the JavaScript function to call to generate the chart's data tip. | Charts
|  | setHorizontalAxis(value:Object):void Updates the horizontal axis with a new type. | Charts
|  | setHorizontalAxisTitle(value:String):void Sets the title displayed next to the horizontal axis. | Charts
|  | setHorizontalField(value:String):void Sets the field used in complex objects to access data to be displayed on the horizontal axis. | Charts
|  | setSeriesStyles(styles:Array):void | Charts
|  | setStyle(name:String, value:Object, json:Boolean = true):void | Charts
|  | setStyles(styles:String):void Accepts a JSON-encoded set of styles for the chart itself. | Charts
|  | setType(value:String):void Creates a chart instance based on the specified type. | Charts
|  | setVerticalAxis(value:Object):void Updates the vertical axis with a new type. | Charts
|  | setVerticalAxisTitle(value:String):void Sets the title displayed next to the vertical axis. | Charts
|  | setVerticalField(value:String):void Sets the field used in complex objects to access data to be displayed on the vertical axis. | Charts

Protected Methods
Hide Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined by
--- | --- | ---
|  | chartItemExtraEventHandler(event:MouseEvent):void | Charts
|  | initializeComponent():void To be overridden by subclasses to add ExternalInterface callbacks. | YUIAdapter
|  | log(message:Object, category:String = null):void Sends a log message to the YUI Logger. | YUIAdapter
|  | setAxisStyles(styles:Object, axisName:String):void | Charts
|  | setDataTipStyles(styles:Object):void | Charts
|  | setLegendStyles(styles:Object):void | Charts
|  | showFatalError(message:Object):void | YUIAdapter

Property detail

legend | property

`protected var legend:Legend`

_legendDisplay | property |

`protected var _legendDisplay:String = "none"`

legendDisplay | property |

`legendDisplay:String` [read-write]Implementation
`public function get legendDisplay():String`
`public function set legendDisplay(value:String):void`

_padding | property |

`protected var _padding:Number = 10`

padding | property |

`padding:Number` [read-write]Implementation
`public function get padding():Number`
`public function set padding(value:Number):void`

_spacing | property |

`protected var _spacing:Number = 6`

spacing | property |

`spacing:Number` [read-write]Implementation
`public function get spacing():Number`
`public function set spacing(value:Number):void`
Constructor detail

Charts | () | constructor

`public function Charts()`

Constructor.

Method detail

chartItemExtraEventHandler | () | method

`protected function chartItemExtraEventHandler(event:MouseEvent):void` Parameters

| `event:MouseEvent`

getCategoryField | () | method |

`public function getCategoryField():String`

Returns the field used in complex objects to access categories to be displayed on the PieChart.

Returns

| `String`

getCategoryNames | () | method |

`public function getCategoryNames():Array`

Returns the category names.

Returns

| `Array`

getDataField | () | method |

`public function getDataField():String`

Returns the field used in complex objects to access data to be displayed on the PieChart.

Returns

| `String`

getHorizontalAxisTitle | () | method |

`public function getHorizontalAxisTitle():String`

Returns the title displayed next to the vertical axis.

Returns

| `String`

getHorizontalField | () | method |

`public function getHorizontalField():String`

Returns the field used in complex objects to access data to be displayed on the horizontal axis.

Returns

| `String`

getVerticalAxisTitle | () | method |

`public function getVerticalAxisTitle():String`

Returns the title displayed next to the vertical axis.

Returns

| `String`

getVerticalField | () | method |

`public function getVerticalField():String`

Returns the field used in complex objects to access data to be displayed on the vertical axis.

Returns

| `String`

setAxisStyles | () | method |

`protected function setAxisStyles(styles:Object, axisName:String):void` Parameters

| `styles:Object`
| `axisName:String`

setCategoryField | () | method |

`public function setCategoryField(value:String):void`

Sets the field used in complex objects to access categories to be displayed on the PieChart.

Parameters

| `value:String`

setCategoryNames | () | method |

`public function setCategoryNames(value:Array):void`

Sets the category names used if the data requires a category axis. This field should be used if the data does not define the category values directly.

Parameters

| `value:Array`

setDataField | () | method |

`public function setDataField(value:String):void`

Sets the field used in complex objects to access data to be displayed on the PieChart.

Parameters

| `value:String`

setDataProvider | () | method |

`public function setDataProvider(value:Array, styleChanged:Boolean = false):void` Parameters

| `value:Array`
| `styleChanged:Boolean` (default = `false`)``

setDataTipFunction | () | method |

`public function setDataTipFunction(value:String):void`

Sets the JavaScript function to call to generate the chart's data tip.

Parameters

| `value:String`

setDataTipStyles | () | method |

`protected function setDataTipStyles(styles:Object):void` Parameters

| `styles:Object`

setHorizontalAxis | () | method |

`public function setHorizontalAxis(value:Object):void`

Updates the horizontal axis with a new type.

Parameters

| `value:Object`

setHorizontalAxisTitle | () | method |

`public function setHorizontalAxisTitle(value:String):void`

Sets the title displayed next to the horizontal axis.

Parameters

| `value:String`

setHorizontalField | () | method |

`public function setHorizontalField(value:String):void`

Sets the field used in complex objects to access data to be displayed on the horizontal axis. If the input data is XML, and the field is an attribute, be sure to include the "

Parameters

| `value:String`

setLegendStyles | () | method |

`protected function setLegendStyles(styles:Object):void` Parameters

| `styles:Object`

setSeriesStyles | () | method |

`public function setSeriesStyles(styles:Array):void` Parameters

| `styles:Array`

setStyle | () | method |

`public function setStyle(name:String, value:Object, json:Boolean = true):void` Parameters

| `name:String`
| `value:Object`
| `json:Boolean` (default = `true`)``

setStyles | () | method |

`public function setStyles(styles:String):void`

Accepts a JSON-encoded set of styles for the chart itself. Flash Player versions below 9.0.60 don't encode ExternalInterface calls correctly!

Parameters

| `styles:String`

setType | () | method |

`public function setType(value:String):void`

Creates a chart instance based on the specified type.

Parameters

| `value:String`

setVerticalAxis | () | method |

`public function setVerticalAxis(value:Object):void`

Updates the vertical axis with a new type.

Parameters

| `value:Object`

setVerticalAxisTitle | () | method |

`public function setVerticalAxisTitle(value:String):void`

Sets the title displayed next to the vertical axis.

Parameters

| `value:String`

setVerticalField | () | method |

`public function setVerticalField(value:String):void`

Sets the field used in complex objects to access data to be displayed on the vertical axis. If the input data is XML, and the field is an attribute, be sure to include the "

Parameters

| `value:String`