Package | com.flexicious.components.tinycharts.valueobjects |
Class | public class Series |
Inheritance | Series mx.styles.CSSStyleDeclaration |
Implements | ILegendItem |
Subclasses | CartesianSeries, DividedSeries |
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Property | Defined By | ||
---|---|---|---|
baseAtZero : Boolean
Specifies whether Flex tries to keep the minimum
and maximum values rooted at zero. | Series | ||
calculatedMinMaxSum : Array
Calculated result of the minmaxsum function. | Series | ||
chart : TinyChartBase | Series | ||
dataFunction : Function
Specifies a method that returns the value that should be used for
positioning the current chart item in the series. | Series | ||
dataPropertyName : String
Returns the attribute on the series that returns the data field on the dataprovider. | Series | ||
dataTipRenderer : IFactory
Renderer for the data tip. | Series | ||
displayName : String
The name of the series, for display to the user. | Series | ||
enabledFunction : Function
Given an item, returns the color for its renderer (line, or column)
| Series | ||
interactive : Boolean
Determines whether data tips appear when users interact
with chart data on the screen. | Series | ||
isSecondary : Boolean = false
Is this a secondary series (not used to render the axes), used
by Multi Series Charts. | Series | ||
itemFillFunction : Function = null
Given an item, returns the color for its renderer (line, or column) . | Series | ||
itemLineColorFunction : Function = null
Given an item, returns the color for its line (or border for its fill) . | Series | ||
labelFunction : Function
Specifies a callback function used to render each label
of the Series. | Series | ||
labelPropertyName : String [read-only]
Returns the attribute on the series that returns the data field on the dataprovider. | Series | ||
labelStyleName : String
This is the style name applied to labels that are drawn on top of individual datapoints
For now this is supported for 3d Pie, Funnel and Pyramid Charts, since they are the only ones
that draw a label on top of the individual data points. | Series | ||
minMaxSumFunction : Function
PLEASE NOTE: Starting 2.10 this function is deprecated. | Series | ||
minMaxSumIntervalFunction : Function
Returns an array of 4 values. | Series | ||
painter : TinyChartPainterBase
The painter responsible for painting the series. | Series | ||
plotPoints : Array
A list of plot points we calculated to render this series
| Series | ||
selectable : Boolean
Specifies whether a series is selectable or not. | Series | ||
selectedIndex : int
Index of the selected item in the data provider of the series. | Series | ||
selectedIndices : Array
An Array of indexes of the selected items in the data provider of the series. | Series | ||
selectedItem : ChartItem
The chart item that is selected in the series. | Series | ||
selectedItems : Array
An Array of chart items that are selected in the series. | Series | ||
seriesIndex : int = 0
The index of this series within the charts series collection. | Series | ||
showDataTips : Boolean
Whether or not to show data tips on mouse over
| Series | ||
useRollover : Boolean
Flag to show a different color for the bar/area that the user has rolled over. | Series |
Method | Defined By | ||
---|---|---|---|
Series()
Constructor. | Series | ||
calculateSteps(minValue:Number, maxValue:Number, sum:Number):Array | Series | ||
defaultDataFunction(series:Series, item:Object, fieldName:String):* [static] | Series | ||
getFillForLegend():IFill
Gets the fill associated with this item for this series. | Series | ||
getItemFill(item:Object):IFill
First, checks to see if item is disabled, then returns disabled color style value, if one defined for the series, other wise the one defined for the chart. | Series | ||
getItemLineColor(item:Object):IFill | Series | ||
getLabelForLegend():String
Gets the label associated with this item for this series. | Series | ||
getPlotPoint(item:Object):PlotPoint
Gets the plot point for this item in this series before this one. | Series | ||
Gets the series before this one. | Series | ||
getStyleValue(prop:String):Object
If a style is defined on this series with a valid value, returns it from the series
style declaration otherwise, returns it from the chart's style declaration. | Series | ||
handleMouseClick(event:MouseEvent, clickedItem:HitData):void
Handles the click. | Series |
Method | Defined By | ||
---|---|---|---|
defaultMinMaxSumFunction(series:Series):Array
Returns the top and bottom for the chart scale. | Series | ||
getFillForItem(styleProp:String, item:Object):IFill
Takes a style property, if it is an array, returns the item in the array according to the mod position of the item in the dataprovider
| Series |
baseAtZero | property |
baseAtZero:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Specifies whether Flex tries to keep the minimum
and maximum
values rooted at zero.
If all axis values are positive, the minimum axis value is zero.
If all axis values are negative, the maximum axis value is zero.
The default value is true
.
public function get baseAtZero():Boolean
public function set baseAtZero(value:Boolean):void
calculatedMinMaxSum | property |
public var calculatedMinMaxSum:Array
Calculated result of the minmaxsum function.
chart | property |
public var chart:TinyChartBase
dataFunction | property |
dataFunction:Function
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Specifies a method that returns the value that should be used for
positioning the current chart item in the series.
If this property is set, the return value of the custom data function takes precedence over the
other related properties, such as xField
and yField
for AreaSeries, BarSeries, BubbleSeries, ColumnSeries, LineSeries, and PlotSeries.
For BubbleSeries, the return value takes precedence over the radiusField
property.
For PieSeries, the return value takes precedence over the field
property.
The custom dataFunction
for a series has the following signature:
function_name (series:Series, item:Object, fieldName:String):Object { ... }
series
is the current series that uses this dataFunction
.
item
is the item in the data provider.
fieldName
is the field in current chart item that is to be populated.
This function returns an object.
You typically use the dataFunction
property to access fields in a data provider that are not
scalar values, but are instead nested in the data provider. For example, the following data
requires a data function to access the fields for a chart's data provider:
{month: "Aug", close: {High:45.87,Low:12.2}, open:25.19}
The following example returns a value from this data provider:
public function myDataFunction(series:Series, item:Object, fieldName:String):Object { if (fieldName == 'yValue') return(item.close.High); else if (fieldName == "xValue") return(item.month); else return null; }
public function get dataFunction():Function
public function set dataFunction(value:Function):void
dataPropertyName | property |
dataPropertyName:String
Returns the attribute on the series that returns the data field on the dataprovider. Defaults to "yField" for most series, and "field" for Pie Series.
public function get dataPropertyName():String
public function set dataPropertyName(value:String):void
dataTipRenderer | property |
public var dataTipRenderer:IFactory
Renderer for the data tip. Must implement IDataTipRenderer
displayName | property |
displayName:String
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
The name of the series, for display to the user. This property is used to represent the series in user-visible labels, such as data tips.
public function get displayName():String
public function set displayName(value:String):void
enabledFunction | property |
public var enabledFunction:Function
Given an item, returns the color for its renderer (line, or column)
interactive | property |
interactive:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Determines whether data tips appear when users interact
with chart data on the screen.
Set to false
to prevent the series
from showing data tips or generating hit data.
The default value is true
.
public function get interactive():Boolean
public function set interactive(value:Boolean):void
isSecondary | property |
public var isSecondary:Boolean = false
Is this a secondary series (not used to render the axes), used by Multi Series Charts.
itemFillFunction | property |
public var itemFillFunction:Function = null
Given an item, returns the color for its renderer (line, or column) . Should take a series and a object and return a uint or a IFill.
itemLineColorFunction | property |
public var itemLineColorFunction:Function = null
Given an item, returns the color for its line (or border for its fill) . Should take a series and a object and return a uint
labelFunction | property |
labelFunction:Function
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Specifies a callback function used to render each label of the Series. A labelFunction must have the following signature:
function function_name(element:ChartItem, series:Series):String { ... }
element
is the chart item that is being rendered.
series
is the series to which the chart item belongs.
The returned String is the label of the current item.
An example usage of a customized labelFunction is as follows:
private function myLabelFunction(element:ChartItem, series:Series):String { var item:ColumnSeriesItem = ColumnSeriesItem(element); var ser:ColumnSeries = ColumnSeries(series); return(item.item.Country + ":" +"" + ser.yField.toString() +":"+ item.yNumber); }
public function get labelFunction():Function
public function set labelFunction(value:Function):void
labelPropertyName | property |
labelPropertyName:String
[read-only] Returns the attribute on the series that returns the data field on the dataprovider. Defaults to "xField" for most series, and "nameField" for Pie Series.
public function get labelPropertyName():String
labelStyleName | property |
public var labelStyleName:String
This is the style name applied to labels that are drawn on top of individual datapoints For now this is supported for 3d Pie, Funnel and Pyramid Charts, since they are the only ones that draw a label on top of the individual data points.
minMaxSumFunction | property |
minMaxSumFunction:Function
PLEASE NOTE: Starting 2.10 this function is deprecated. Please use the minMaxSumIntervalFunction to change it.
public function get minMaxSumFunction():Function
public function set minMaxSumFunction(value:Function):void
minMaxSumIntervalFunction | property |
public var minMaxSumIntervalFunction:Function
Returns an array of 4 values. [min,max,sum,interval]. Should take the series object and return the min and max, as well as the sum (this is needed for the pie charts. For others it can be zero Finally, the last variable is the interval, which is used for the minor ticks on the axis. This is not required for Tinycharts, only the regular charts. Min and Max become The top and bottom for the chart scale. You can access the data provider via series.chart.dataProvider.
painter | property |
painter:TinyChartPainterBase
The painter responsible for painting the series.
public function get painter():TinyChartPainterBase
public function set painter(value:TinyChartPainterBase):void
plotPoints | property |
public var plotPoints:Array
A list of plot points we calculated to render this series
selectable | property |
selectable:Boolean
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Specifies whether a series is selectable or not.
The default value is true
.
public function get selectable():Boolean
public function set selectable(value:Boolean):void
selectedIndex | property |
selectedIndex:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Index of the selected item in the data provider of the series. If multiple items are selected, then this property refers to the most recently selected item.
public function get selectedIndex():int
public function set selectedIndex(value:int):void
selectedIndices | property |
selectedIndices:Array
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
An Array of indexes of the selected items in the data provider of the series.
public function get selectedIndices():Array
public function set selectedIndices(value:Array):void
selectedItem | property |
selectedItem:ChartItem
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
The chart item that is selected in the series. If multiple items are selected, then this property refers to the most recently selected item.
public function get selectedItem():ChartItem
public function set selectedItem(value:ChartItem):void
selectedItems | property |
selectedItems:Array
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
An Array of chart items that are selected in the series.
public function get selectedItems():Array
public function set selectedItems(value:Array):void
seriesIndex | property |
public var seriesIndex:int = 0
The index of this series within the charts series collection.
showDataTips | property |
showDataTips:Boolean
Whether or not to show data tips on mouse over
public function get showDataTips():Boolean
public function set showDataTips(value:Boolean):void
useRollover | property |
useRollover:Boolean
Flag to show a different color for the bar/area that the user has rolled over.
public function get useRollover():Boolean
public function set useRollover(value:Boolean):void
Series | () | Constructor |
public function Series()
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Constructor.
calculateSteps | () | method |
public function calculateSteps(minValue:Number, maxValue:Number, sum:Number):Array
Parameters
minValue:Number | |
maxValue:Number | |
sum:Number |
Array |
defaultDataFunction | () | method |
public static function defaultDataFunction(series:Series, item:Object, fieldName:String):*
Parameters
series:Series | |
item:Object | |
fieldName:String |
* |
defaultMinMaxSumFunction | () | method |
protected function defaultMinMaxSumFunction(series:Series):Array
Returns the top and bottom for the chart scale.
Parameters
series:Series |
Array |
getFillForItem | () | method |
protected function getFillForItem(styleProp:String, item:Object):IFill
Takes a style property, if it is an array, returns the item in the array according to the mod position of the item in the dataprovider
Parameters
styleProp:String | |
item:Object |
IFill —
|
getFillForLegend | () | method |
public function getFillForLegend():IFill
Gets the fill associated with this item for this series.
ReturnsIFill |
getItemFill | () | method |
public function getItemFill(item:Object):IFill
First, checks to see if item is disabled, then returns disabled color style value, if one defined for the series, other wise the one defined for the chart. Then, checks to see if item is selected, then returns selected color, if one defined for the series, other wise the one defined for the chart. Then, checks to see if item is under mouse, the returns itemRollOverColor, if one defined for the series, other wise the one defined for the chart.
Parameters
item:Object |
IFill |
getItemLineColor | () | method |
public function getItemLineColor(item:Object):IFill
Parameters
item:Object |
IFill |
getLabelForLegend | () | method |
public function getLabelForLegend():String
Gets the label associated with this item for this series.
ReturnsString |
getPlotPoint | () | method |
public function getPlotPoint(item:Object):PlotPoint
Gets the plot point for this item in this series before this one.
Parameters
item:Object |
PlotPoint |
getPreviousSeries | () | method |
getStyleValue | () | method |
public function getStyleValue(prop:String):Object
If a style is defined on this series with a valid value, returns it from the series style declaration otherwise, returns it from the chart's style declaration.
Parameters
prop:String — The style property to lookup
|
Object — The value of the property, as defined on the series, if not defined on the series, as defined on the chart.
|
handleMouseClick | () | method |
public function handleMouseClick(event:MouseEvent, clickedItem:HitData):void
Handles the click. If Control key is NOT pressed, if there is no item in the selectedItems collection that matches the passed in clicked Item, sets the selectedItems array to a single item array of clickedItem.chartItem, else sets selectedItems to empty array else if Control Key is Pressed, if there is no item in the selectedItems collection that matches the passed in clicked Item, adds the passed in clicked item to the selectedItems array, else removes the passed in clicked item from the selectedItems array
Parameters
event:MouseEvent — Mouse Event that triggered this call
| |
clickedItem:HitData — The Closest Clicked Item.
|