Packageardisia.charts.sparklines
Classpublic class SparklineLine
InheritanceSparklineLine Inheritance SparklineBase Inheritance spark.components.Group

Sparkline chart that uses a line (stroke) to present the data.

View the technical documentation on the Ardisia Labs website for more information.

Default MXML PropertydataProvider



Public Properties
 PropertyDefined By
 InheritedautoAxis : Boolean
True to automatically set the axis value to the mean of the calculated maximum and minimum y values.
SparklineBase
 InheritedautoNormalRange : Boolean
If true, the normal range height and y position will be automatically calculated and displayed in the center of the control.
SparklineBase
 InheritedautoNormalRangePercent : Number
If "autoNormalRange" is true, this is the percentage of the height of the chart covered by the normal range.
SparklineBase
 InheritedautoRange : Boolean
If true, the minY and maxY values will be automatically calculated from the data provider.
SparklineBase
 InheritedaxisValue : Number
The data value at which to display the axis.
SparklineBase
 InheriteddataProvider : IList
The data used to populate the spark line.
SparklineBase
 InheriteddataTipDefaultPrecision : Number = 2
Default numerical precision for the number formatter if a dataTipFormatFunction or dataTipField is not provided.
SparklineBase
 InheriteddataTipField : String
Field name on the data to pull the node's data tip string.
SparklineBase
 InheriteddataTipFormatFunction : Function
User provided function that gets the string to display with the data tip.
SparklineBase
 InheriteddataTipHideDelay : Number = 250
Delay before the data tip is hidden.
SparklineBase
  form : String
The type of line to draw.
SparklineLine
 InheritedmaxY : Number
The maximum displayed y value.
SparklineBase
 InheritedminY : Number
The minimum displayed y value.
SparklineBase
 InheritednormalRangeMaxY : Number
If "autoNormalRange" is false, this is the maximum value contained within the normal range.
SparklineBase
 InheritednormalRangeMinY : Number
If "autoNormalRange" is false, this is the minimum value contained within the normal range.
SparklineBase
 InheritedshowAxis : Boolean
True to display the axis.
SparklineBase
 InheritedshowDataTip : Boolean = true
True to display a data tip on hover.
SparklineBase
  showMarkers : Boolean
True to display markers (circles) at each data point along the line.
SparklineLine
 InheritedshowNormalRange : Boolean
True to display a rectangular region used to represent the "normal value range".
SparklineBase
  xField : String
Specifies the field on the objects in the dataProvider that contains the x value, or the position along the x-axis to display the data point.
SparklineLine
 InheritedyField : String
Specifies the field on the objects in the dataProvider that contains the y value, or the data value to visually represent.
SparklineBase
Public Methods
 MethodDefined By
 Inherited
Hide the data tip.
SparklineBase
Protected Methods
 MethodDefined By
 Inherited
collectionChangeHandler(event:CollectionEvent):void
Handles the collection events on the dataProvider.
SparklineBase
 Inherited
drawAxis(xOffset:Number, yOffset:Number, width:Number, height:Number):void
Draws the axis line.
SparklineBase
 Inherited
drawBackground(width:Number, height:Number):void
Draws the background and the border.
SparklineBase
 Inherited
drawNormalRange(xOffset:Number = 0, yOffset:Number = 0, width:Number = 0, height:Number = 0):void
Draws the normal range.
SparklineBase
 Inherited
eventHandler(event:Event):void
Handles events on the component.
SparklineBase
 Inherited
getDataTipContent(item:Object):Object
Returns the contents for the data tip.
SparklineBase
  
getXValue(value:Object, index:int):Number
Returns the x value for display.
SparklineLine
 Inherited
getYValue(value:Object):Number
Returns the y value for display.
SparklineBase
 Inherited
mouseHandler(event:Event):void
Handles the mouse events used to display the data tip.
SparklineBase
  
[override] Processes the data provider and gets the required values necessary for display.
SparklineLine
 Inherited
setupDataTip(data:Object):void
Setup the data tip.
SparklineBase
Styles
 Style Description Defined By
 InheritedType: Number CSS Inheritance: no
The alpha of the axis stroke.
SparklineBase
 InheritedType: uint Format: Color CSS Inheritance: no
The color of the axis stroke.
SparklineBase
 InheritedType: Number CSS Inheritance: no
The thickness of the axis stroke.
SparklineBase
 InheritedType: Number CSS Inheritance: no
The alpha of the background.
SparklineBase
 InheritedType: uint Format: Color CSS Inheritance: no
The color of the background.
SparklineBase
 InheritedType: uint Format: Color CSS Inheritance: no
The displayed color for the first and last data points.
SparklineBase
  
firstLastMarkerRadius
Type: Number CSS Inheritance: no
The radius of the marker (circle) to draw at the first and last point on the line.

Only relevant if the "showMarkers" property is true.

The default value is 2.
SparklineLine
  
markerColor
Type: uint Format: Color CSS Inheritance: no
The color of the markers (circles) drawn at the data points.

Only relevant if any markers are drawn.

The default value is #DE3914.
SparklineLine
  
markerRadius
Type: Number CSS Inheritance: no
The default radius of the markers.

Only relevant if the "showMarkers" property is true.

The default value is 1.
SparklineLine
 InheritedType: uint Format: Color CSS Inheritance: no
The displayed color for the maximum and minimum value data points.
SparklineBase
  
minMaxMarkerRadius
Type: Number CSS Inheritance: no
The radius of the marker (circle) to draw at the maximum and minimum valued data points on the line.

Only relevant if the "showMarkers" property is true.

The default value is 2.
SparklineLine
 InheritedType: Number CSS Inheritance: no
The alpha of the normal range.
SparklineBase
 InheritedType: uint Format: Color CSS Inheritance: no
The color of the normal range.
SparklineBase
  
strokeColor
Type: uint Format: Color CSS Inheritance: no
The color used when drawing the line. The default value is #32A6DD.
SparklineLine
  
strokeThickness
Type: Number CSS Inheritance: no
The thickness of the drawn line. The default value is 1.
SparklineLine
Property Detail
formproperty
form:String

The type of line to draw.

Possibilites are "segment,step,vertical,horizontal,reverseStep,curve". See the Flex charting classes for definitions of each.

The default value is "segment".


Implementation
    public function get form():String
    public function set form(value:String):void
showMarkersproperty 
showMarkers:Boolean

True to display markers (circles) at each data point along the line.

The default value is false.


Implementation
    public function get showMarkers():Boolean
    public function set showMarkers(value:Boolean):void
xFieldproperty 
xField:String

Specifies the field on the objects in the dataProvider that contains the x value, or the position along the x-axis to display the data point.

If not set, this class will assume the relative x value is determined by the data's index in the underlying dataProvider.

The default value is "".


Implementation
    public function get xField():String
    public function set xField(value:String):void
Method Detail
getXValue()method
protected function getXValue(value:Object, index:int):Number

Returns the x value for display.

Parameters

value:Object — the Object
 
index:int — the index of the data in the dataProvider

Returns
Number — Number
processDataProvider()method 
override protected function processDataProvider():void

Processes the data provider and gets the required values necessary for display.