Packagecom.flexicious.components.tinycharts.valueobjects
Classpublic class Series
InheritanceSeries Inheritance 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

The Series class is the base class for the classes that let you specify a data series for a chart control. You use the subclasses of the Series class with the associated chart control. You can use a Series class to specify the fill pattern and stroke characteristics for the chart elements that are associated with the data series.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
Constructor.
Series
  
calculateSteps(minValue:Number, maxValue:Number, sum:Number):Array
Series
  
defaultDataFunction(series:Series, item:Object, fieldName:String):*
[static]
Series
  
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
  
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
Protected Methods
 MethodDefined By
  
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
Styles
 Style Description Defined By
  
backgroundFill
Type: mx.graphics.IFill CSS Inheritance: no
Series
  
itemDisabledFills
Type: Array
Series
  
itemDisabledLineColors
Type: Array
Series
  
itemFills
Type: Array
Series
  
itemLineColors
Type: Array
Series
  
itemRollOverFills
Type: Array
Series
  
itemRollOverLineColors
Type: Array
Series
  
itemSelectionFills
Type: Array
Series
  
itemSelectionLineColors
Type: Array
Series
Property Detail
baseAtZeroproperty
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.


Implementation
    public function get baseAtZero():Boolean
    public function set baseAtZero(value:Boolean):void
calculatedMinMaxSumproperty 
public var calculatedMinMaxSum:Array

Calculated result of the minmaxsum function.

chartproperty 
public var chart:TinyChartBase

dataFunctionproperty 
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;
		 }     
		 


Implementation
    public function get dataFunction():Function
    public function set dataFunction(value:Function):void
dataPropertyNameproperty 
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.


Implementation
    public function get dataPropertyName():String
    public function set dataPropertyName(value:String):void
dataTipRendererproperty 
public var dataTipRenderer:IFactory

Renderer for the data tip. Must implement IDataTipRenderer

displayNameproperty 
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.


Implementation
    public function get displayName():String
    public function set displayName(value:String):void
enabledFunctionproperty 
public var enabledFunction:Function

Given an item, returns the color for its renderer (line, or column)

interactiveproperty 
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.


Implementation
    public function get interactive():Boolean
    public function set interactive(value:Boolean):void
isSecondaryproperty 
public var isSecondary:Boolean = false

Is this a secondary series (not used to render the axes), used by Multi Series Charts.

itemFillFunctionproperty 
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.

itemLineColorFunctionproperty 
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

labelFunctionproperty 
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);
		 }
		 


Implementation
    public function get labelFunction():Function
    public function set labelFunction(value:Function):void
labelPropertyNameproperty 
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.


Implementation
    public function get labelPropertyName():String
labelStyleNameproperty 
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.

minMaxSumFunctionproperty 
minMaxSumFunction:Function

PLEASE NOTE: Starting 2.10 this function is deprecated. Please use the minMaxSumIntervalFunction to change it.


Implementation
    public function get minMaxSumFunction():Function
    public function set minMaxSumFunction(value:Function):void
minMaxSumIntervalFunctionproperty 
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.

painterproperty 
painter:TinyChartPainterBase

The painter responsible for painting the series.


Implementation
    public function get painter():TinyChartPainterBase
    public function set painter(value:TinyChartPainterBase):void
plotPointsproperty 
public var plotPoints:Array

A list of plot points we calculated to render this series

selectableproperty 
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.


Implementation
    public function get selectable():Boolean
    public function set selectable(value:Boolean):void
selectedIndexproperty 
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.


Implementation
    public function get selectedIndex():int
    public function set selectedIndex(value:int):void
selectedIndicesproperty 
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.


Implementation
    public function get selectedIndices():Array
    public function set selectedIndices(value:Array):void
selectedItemproperty 
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.


Implementation
    public function get selectedItem():ChartItem
    public function set selectedItem(value:ChartItem):void
selectedItemsproperty 
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.


Implementation
    public function get selectedItems():Array
    public function set selectedItems(value:Array):void
seriesIndexproperty 
public var seriesIndex:int = 0

The index of this series within the charts series collection.

showDataTipsproperty 
showDataTips:Boolean

Whether or not to show data tips on mouse over


Implementation
    public function get showDataTips():Boolean
    public function set showDataTips(value:Boolean):void
useRolloverproperty 
useRollover:Boolean

Flag to show a different color for the bar/area that the user has rolled over.


Implementation
    public function get useRollover():Boolean
    public function set useRollover(value:Boolean):void
Constructor Detail
Series()Constructor
public function Series()

Language Version : ActionScript 3.0
Product Version : Flex 3
Runtime Versions : Flash Player 9, AIR 1.1

Constructor.

Method Detail
calculateSteps()method
public function calculateSteps(minValue:Number, maxValue:Number, sum:Number):Array

Parameters

minValue:Number
 
maxValue:Number
 
sum:Number

Returns
Array
defaultDataFunction()method 
public static function defaultDataFunction(series:Series, item:Object, fieldName:String):*

Parameters

series:Series
 
item:Object
 
fieldName:String

Returns
*
defaultMinMaxSumFunction()method 
protected function defaultMinMaxSumFunction(series:Series):Array

Returns the top and bottom for the chart scale.

Parameters

series:Series

Returns
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

Returns
IFill
getFillForLegend()method 
public function getFillForLegend():IFill

Gets the fill associated with this item for this series.

Returns
IFill
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

Returns
IFill
getItemLineColor()method 
public function getItemLineColor(item:Object):IFill

Parameters

item:Object

Returns
IFill
getLabelForLegend()method 
public function getLabelForLegend():String

Gets the label associated with this item for this series.

Returns
String
getPlotPoint()method 
public function getPlotPoint(item:Object):PlotPoint

Gets the plot point for this item in this series before this one.

Parameters

item:Object

Returns
PlotPoint
getPreviousSeries()method 
public function getPreviousSeries():Series

Gets the series before this one.

Returns
Series
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

Returns
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.