YUI Flash Component Documentation |
Interface IChart

Package | com.yahoo.astra.fl.charts
Interface | public interface IChart extends flash.events.IEventDispatcher
Implementors | CartesianChart

Methods and properties expected to be defined by all charts.

Public Properties

| Property | Defined by
--- | --- | ---
|  | dataProvider : Object The data to be displayed by the chart. | IChart

Public Methods

| Method | Defined by
--- | --- | ---
|  | itemToAxisValue(series:ISeries, itemIndex:int, axis:IAxis, stack:Boolean = true):Object Retreives the value of an item on one of the chart's axes. | IChart
|  | itemToPosition(series:ISeries, itemIndex:int):Point Calculates the position of a data point along the axis. | IChart

Property detail

dataProvider | property

`dataProvider:Object` [read-write]

The data to be displayed by the chart. Accepted data types include all of the following:

- An ISeries instance with its own data provider.
- An Array containing ISeries instances
- An Array containing Numbers.
- An Array containing complex objects.
- An XMLList
- An Array containing Arrays of Numbers or complex objects.

Note: When complex objects or XML is used in the data provider, developers must define "fields" used to access data used by the chart. For instance, CartesianChart exposes `horizontalField` and `verticalField` properties. PieChart exposes `dataField` and `categoryField` properties.

The chart will automatically convert the input data to an Array of ISeries objects. Don't access `dataProvider` if you intend to retreive the data in its original form. Implementation
`public function get dataProvider():Object`
`public function set dataProvider(value:Object):void`

See also

com.yahoo.astra.fl.charts.series.ISeries
Method detail

itemToAxisValue | () | method

`public function itemToAxisValue(series:ISeries, itemIndex:int, axis:IAxis, stack:Boolean = true):Object`

Retreives the value of an item on one of the chart's axes.

Parameters

| `series:ISeries` — The series in which the item appears.
| `itemIndex:int` — The index of the item within the series.
| `axis:IAxis` — The axis for which to extract the value.
| `stack:Boolean` (default = `true`)``

Returns

| `Object` — The value of the item on the axis. Most likely a field on the axis.

itemToPosition | () | method |

`public function itemToPosition(series:ISeries, itemIndex:int):Point`

Calculates the position of a data point along the axis.

Parameters

| `series:ISeries` — The series in which the data appears.
| `itemIndex:int` — The index of the item within the series.

Returns

| `Point` — The display position in pixels on the axis