Package | com.yahoo.astra.fl.charts |
Class | public class Chart |
Inheritance | Chart ![]() |
Subclasses | CartesianChart, PieChart |
Chart
object
shouldn't be instantiated directly. Instead, a subclass with a concrete
implementation should be used. That subclass generally should implement the
IPlotArea
interface.
Property | Defined by | ||
---|---|---|---|
dataProvider : Object
The data to be displayed by the chart.
| Chart | ||
dataTipFunction : Function
If defined, the chart will call the input function to determine the
text displayed in the chart's data tip.
| Chart | ||
defaultSeriesType : Object
When raw data (like an Array of Numbers) is encountered where an
ISeries instance is expected, it will be converted to this default
type.
| Chart | ||
legend : ILegend
The component that will display a human-readable legend for the chart.
| Chart | ||
legendLabelFunction : Function
If defined, the chart will call the input function to determine the text displayed in
in the chart's legend.
| Chart |
Method | Defined by | ||
---|---|---|---|
Chart()
Constructor.
| Chart | ||
indexToSeries(index:int):ISeries
Returns the ISeries object at the specified index.
| Chart | ||
seriesToIndex(series:ISeries):int
Returns the index within this plot area of the input ISeries object.
| Chart |
Method | Defined by | ||
---|---|---|---|
refreshSeries():void
Analyzes the input data and smartly converts it to the correct ISeries type
required for drawing.
| Chart |
dataProvider | property |
dataProvider:Object
[read-write]The data to be displayed by the chart. Accepted data types include all of the following:
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
dataTipFunction | property |
dataTipFunction:Function
[read-write]If defined, the chart will call the input function to determine the text displayed in the chart's data tip. The function uses the following signature:
function dataTipFunction(item:Object, index:int, series:ISeries):String
public function get dataTipFunction():Function
public function set dataTipFunction(value:Function):void
defaultSeriesType | property |
defaultSeriesType:Object
[read-write]When raw data (like an Array of Numbers) is encountered where an ISeries instance is expected, it will be converted to this default type. Accepts either a Class instance or a String referencing a fully-qualified class name.
Implementation public function get defaultSeriesType():Object
public function set defaultSeriesType(value:Object):void
legend | property |
legend:ILegend
[read-write]The component that will display a human-readable legend for the chart.
Implementation public function get legend():ILegend
public function set legend(value:ILegend):void
legendLabelFunction | property |
legendLabelFunction:Function
[read-write]If defined, the chart will call the input function to determine the text displayed in in the chart's legend.
Implementation public function get legendLabelFunction():Function
public function set legendLabelFunction(value:Function):void
Chart | () | constructor |
public function Chart()
Constructor.
indexToSeries | () | method |
public function indexToSeries(index:int):ISeries
Returns the ISeries object at the specified index.
Parametersindex:int — the index of the series to return
|
ISeries —
the series that appears at the input index or null if out of bounds
|
refreshSeries | () | method |
protected function refreshSeries():void
Analyzes the input data and smartly converts it to the correct ISeries type required for drawing. Adds new ISeries objects to the display list and removes unused series objects that no longer need to be drawn.
seriesToIndex | () | method |
public function seriesToIndex(series:ISeries):int
Returns the index within this plot area of the input ISeries object.
Parametersseries:ISeries — a series that is displayed in this plot area.
|
int — the index of the input series
|