Packagecom.scottlogic.sparkline.sparklineClasses
Classpublic class SparklineBase
InheritanceSparklineBase Inheritance mx.core.UIComponent
Implementsmx.controls.listClasses.IDropInListItemRenderer, mx.controls.listClasses.IListItemRenderer
SubclassesColumnSparklineBase, Sparkline

Base functionality for all sparkline types.



Public Properties
 PropertyDefined by
  data : Object
The data property lets you pass a value to the component when you use it as an item renderer or item editor.
SparklineBase
  dataProvider : Object
The data provider for this sparkline.
SparklineBase
  listData : BaseListData
When a component is used as a drop-in item renderer or drop-in item editor, Flex initializes the listData property of the component with the appropriate data from the list control.
SparklineBase
  xField : String
Specifies the field of the data provider that determines the x-axis location of each data point.
SparklineBase
  yField : String
Specifies the field of the data provider that determines the y-axis location of each data point.
SparklineBase
Protected Properties
 PropertyDefined by
  bounds : Rectangle
The bounds within which the line part of the sparkline should be restricted.
SparklineBase
Public Methods
 MethodDefined by
  
Constructor
SparklineBase
Protected Methods
 MethodDefined by
  
drawBackground(width:Number, height:Number):void
Draws the background for the sparkline.
SparklineBase
  
Marks the current render data cache as dirty.
SparklineBase
  
measure():void
SparklineBase
  
updateBounds(width:Number, height:Number):void
Ensures the bounds are up to date.
SparklineBase
  
updateData():void
Updates the render data cache to reflect the current data provider values.
SparklineBase
  
validateData():void
If the current render data cache is considered dirty then it updates the cache.
SparklineBase
Styles
 StyleDescriptionDefined by
  
fill
Type: mx.graphics.IFill   CSS Inheritance: no
Sets the background fill for the sparkline. The default background fill is transparent.
SparklineBase
  
paddingBottom
Type: Number   Format: Length   CSS Inheritance: no
Sets the padding to the bottom of the sparkline. The default value is 2.
SparklineBase
  
paddingLeft
Type: Number   Format: Length   CSS Inheritance: no
Sets the padding to the left of the sparkline. The default value is 2.
SparklineBase
  
paddingRight
Type: Number   Format: Length   CSS Inheritance: no
Sets the padding to the right of the sparkline. The default value is 2.
SparklineBase
  
paddingTop
Type: Number   Format: Length   CSS Inheritance: no
Sets the padding to the top of the sparkline. The default value is 2.
SparklineBase
Property detail
boundsproperty
protected var bounds:Rectangle

The bounds within which the line part of the sparkline should be restricted.

dataproperty 
data:Object  [read-write]

The data property lets you pass a value to the component when you use it as an item renderer or item editor. You typically use data binding to bind a field of the data property to a property of this component.

When you use the control as a drop-in item renderer or drop-in item editor, Flex automatically writes the current value of the item to the selected property of this control.

You do not set this property in MXML.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get data():Object
    public function set data(value:Object):void

See also

mx.core.IDataRenderer
dataProviderproperty 
dataProvider:Object  [read-write]

The data provider for this sparkline. When used as an item renderer or item editor this will be intialised to the value set on data.

Implementation
    public function get dataProvider():Object
    public function set dataProvider(value:Object):void
listDataproperty 
listData:BaseListData  [read-write]

When a component is used as a drop-in item renderer or drop-in item editor, Flex initializes the listData property of the component with the appropriate data from the list control. The component can then use the listData property to initialize the data property of the drop-in item renderer or drop-in item editor.

You do not set this property in MXML or ActionScript; Flex sets it when the component is used as a drop-in item renderer or drop-in item editor.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get listData():BaseListData
    public function set listData(value:BaseListData):void

See also

mx.controls.listClasses.IDropInListItemRenderer
xFieldproperty 
xField:String  [read-write]

Specifies the field of the data provider that determines the x-axis location of each data point. If null, the data points are rendered in the order they appear in the data provider.

The default value is null.

Implementation
    public function get xField():String
    public function set xField(value:String):void
yFieldproperty 
yField:String  [read-write]

Specifies the field of the data provider that determines the y-axis location of each data point. If null, the Sparkline assumes the data provider consists of the set of values and attempts to convert them to numbers.

The default value is null.

Implementation
    public function get yField():String
    public function set yField(value:String):void
Constructor detail
SparklineBase()constructor
public function SparklineBase()

Constructor

Method detail
drawBackground()method
protected function drawBackground(width:Number, height:Number):void

Draws the background for the sparkline.

Parameters
width:Number
 
height:Number
invalidateData()method 
protected function invalidateData():void

Marks the current render data cache as dirty.

measure()method 
protected override function measure():void
updateBounds()method 
protected function updateBounds(width:Number, height:Number):void

Ensures the bounds are up to date.

Parameters
width:Number
 
height:Number
updateData()method 
protected function updateData():void

Updates the render data cache to reflect the current data provider values. Maps the data provider values to screen coordinates. Should be implemented by sub-class.

validateData()method 
protected function validateData():void

If the current render data cache is considered dirty then it updates the cache.