| Package | flare.vis.data |
| Class | public class DataSprite |
| Inheritance | DataSprite DirtySprite flash.display.Sprite |
| Subclasses | EdgeSprite, NodeSprite |
angle and
radius), and others.
The actual appearance of DataSprite instances are determined using pluggable renderers that draw graphical content for the sprite. These renderers can be changed at runtime to dynamically control appearances. Furthermore, since these are sprites, they can contain arbitrary display objects as children on the display list, including entire nested visualizations.
DataSprites provides two additional properties worth noting. First,
the data property references an object containing backing
data to be visualized. This data object is typically the data record
(or tuple) this DataSprite visually represents, and its values are often
used to determined visual encodings. Second, the props
objects is a dynamic object provided for attaching arbitrary properties
to a DataSprite instance. For example, some layout algorithms require
additional parameters on a per-item basis and store these values in the
props property.
| Property | Defined by | ||
|---|---|---|---|
![]() | angle : Number The angle value of this sprite's position in polar co-ordinates.
| DirtySprite | |
| data : Object Object storing backing data values.
| DataSprite | ||
| fillAlpha : Number The alpha channel (a value between 0 and 1) for the fill color.
| DataSprite | ||
| fillColor : uint The fill color for this data sprite.
| DataSprite | ||
| fillHue : Number The hue component of the fill color in HSV color space.
| DataSprite | ||
| fillSaturation : Number The saturation component of the fill color in HSV color space.
| DataSprite | ||
| fillValue : Number The value (brightness) component of the fill color in HSV color space.
| DataSprite | ||
| fixed : Boolean [read-only] Fixed flag to prevent this sprite from being re-positioned.
| DataSprite | ||
| h : Number Auxiliary property often used as a height parameter.
| DataSprite | ||
![]() | height : Number
If dirty, this sprite is re-rendered before returning the height.
| DirtySprite | |
| lineAlpha : Number The alpha channel (a value between 0 and 1) for the line color.
| DataSprite | ||
| lineColor : uint The line color for this data sprite.
| DataSprite | ||
| lineHue : Number The hue component of the line color in HSV color space.
| DataSprite | ||
| lineSaturation : Number The saturation component of the line color in HSV color space.
| DataSprite | ||
| lineValue : Number The value (brightness) component of the line color in HSV color space.
| DataSprite | ||
| lineWidth : Number The line width for this data sprite.
| DataSprite | ||
![]() | origin : Point The origin point for polar coordinates.
| DirtySprite | |
| points : Array Optional array of x,y values for specifying arbitrary shapes.
| DataSprite | ||
| props : Object Object for attaching additional properties to this sprite.
| DataSprite | ||
![]() | radius : Number The radius value of this sprite's position in polar co-ordinates.
| DirtySprite | |
| renderer : IRenderer
The renderer for drawing this DataSprite.
| DataSprite | ||
| shape : String Name of the shape value of this data sprite.
| DataSprite | ||
| size : Number The size value of this data sprite (1 by default).
| DataSprite | ||
| u : Number Auxiliary property often used as a shape parameter.
| DataSprite | ||
| v : Number Auxiliary property often used as a shape parameter.
| DataSprite | ||
| w : Number Auxiliary property often used as a width parameter.
| DataSprite | ||
![]() | width : Number
If dirty, this sprite is re-rendered before returning the width.
| DirtySprite | |
![]() | x : Number | DirtySprite | |
![]() | y : Number | DirtySprite | |
| Property | Defined by | ||
|---|---|---|---|
![]() | _angle : Number The angle value of this sprite's position in polar co-ordinates.
| DirtySprite | |
| _data : Object Object storing backing data values.
| DataSprite | ||
| _fillColor : uint = 0xffcccccc The fill color for this data sprite.
| DataSprite | ||
| _fixed : int = 0 Fixed flag to prevent this sprite from being re-positioned.
| DataSprite | ||
| _h : Number = 0 Auxiliary property often used as a height parameter.
| DataSprite | ||
| _lineColor : uint = 0xff000000 The line color for this data sprite.
| DataSprite | ||
| _lineWidth : Number = 0 The line width for this data sprite.
| DataSprite | ||
![]() | _origin : Point The origin point for polar coordinates.
| DirtySprite | |
| _points : Array Optional array of x,y values for specifying arbitrary shapes.
| DataSprite | ||
| _prop : Object Object for attaching additional properties to this sprite.
| DataSprite | ||
![]() | _radius : Number The radius value of this sprite's position in polar co-ordinates.
| DirtySprite | |
| _renderer : IRenderer
The renderer for drawing this DataSprite.
| DataSprite | ||
| _shape : String = "circle" Code indicating the shape value of this data sprite.
| DataSprite | ||
| _size : Number = 1 The size value of this data sprite (1 by default).
| DataSprite | ||
| _u : Number = 0 Auxiliary property often used as a shape parameter.
| DataSprite | ||
| _v : Number = 0 Auxiliary property often used as a shape parameter.
| DataSprite | ||
| _w : Number = 0 Auxiliary property often used as a width parameter.
| DataSprite | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new DataSprite.
| DataSprite | ||
![]() |
dirty():void
Marks this sprite as "dirty" and in need of re-rendering.
| DirtySprite | |
|
fix(num:uint = 1):void
Increments the fixed counter.
| DataSprite | ||
![]() |
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered returning the bounds.
| DirtySprite | |
![]() |
getRect(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered before returning the rect.
| DirtySprite | |
![]() |
hitTestObject(obj:DisplayObject):Boolean
If dirty, either sprite is re-rendered before hit-testing.
| DirtySprite | |
![]() |
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
If dirty, this sprite is re-rendered before hit-testing.
| DirtySprite | |
|
render():void
Draw this sprite's graphical content.
| DataSprite | ||
![]() |
renderDirty(evt:Event = null):void
[static]
Frame render callback that renders all sprites on the dirty list.
| DirtySprite | |
![]() |
toString():String
| DirtySprite | |
|
unfix(num:uint = 1):void
Decrements the fixed counter.
| DataSprite | ||
| _data | property |
protected var _data:ObjectObject storing backing data values.
| data | property |
data:Object [read-write]Object storing backing data values.
Implementation public function get data():Object
public function set data(value:Object):void
| fillAlpha | property |
fillAlpha:Number [read-write]The alpha channel (a value between 0 and 1) for the fill color.
Implementation public function get fillAlpha():Number
public function set fillAlpha(value:Number):void
| _fillColor | property |
protected var _fillColor:uint = 0xffccccccThe fill color for this data sprite. This value is specified as an unsigned integer representing an ARGB color. Notice that this includes the alpha channel in the color value.
| fillColor | property |
fillColor:uint [read-write]The fill color for this data sprite. This value is specified as an unsigned integer representing an ARGB color. Notice that this includes the alpha channel in the color value.
Implementation public function get fillColor():uint
public function set fillColor(value:uint):void
| fillHue | property |
fillHue:Number [read-write]The hue component of the fill color in HSV color space.
Implementation public function get fillHue():Number
public function set fillHue(value:Number):void
| fillSaturation | property |
fillSaturation:Number [read-write]The saturation component of the fill color in HSV color space.
Implementation public function get fillSaturation():Number
public function set fillSaturation(value:Number):void
| fillValue | property |
fillValue:Number [read-write]The value (brightness) component of the fill color in HSV color space.
Implementation public function get fillValue():Number
public function set fillValue(value:Number):void
| _fixed | property |
protected var _fixed:int = 0Fixed flag to prevent this sprite from being re-positioned.
| fixed | property |
fixed:Boolean [read-only]Fixed flag to prevent this sprite from being re-positioned.
Implementation public function get fixed():Boolean
| _h | property |
protected var _h:Number = 0Auxiliary property often used as a height parameter.
| h | property |
h:Number [read-write]Auxiliary property often used as a height parameter.
Implementation public function get h():Number
public function set h(value:Number):void
| lineAlpha | property |
lineAlpha:Number [read-write]The alpha channel (a value between 0 and 1) for the line color.
Implementation public function get lineAlpha():Number
public function set lineAlpha(value:Number):void
| _lineColor | property |
protected var _lineColor:uint = 0xff000000The line color for this data sprite. This value is specified as an unsigned integer representing an ARGB color. Notice that this includes the alpha channel in the color value.
| lineColor | property |
lineColor:uint [read-write]The line color for this data sprite. This value is specified as an unsigned integer representing an ARGB color. Notice that this includes the alpha channel in the color value.
Implementation public function get lineColor():uint
public function set lineColor(value:uint):void
| lineHue | property |
lineHue:Number [read-write]The hue component of the line color in HSV color space.
Implementation public function get lineHue():Number
public function set lineHue(value:Number):void
| lineSaturation | property |
lineSaturation:Number [read-write]The saturation component of the line color in HSV color space.
Implementation public function get lineSaturation():Number
public function set lineSaturation(value:Number):void
| lineValue | property |
lineValue:Number [read-write]The value (brightness) component of the line color in HSV color space.
Implementation public function get lineValue():Number
public function set lineValue(value:Number):void
| _lineWidth | property |
protected var _lineWidth:Number = 0The line width for this data sprite.
| lineWidth | property |
lineWidth:Number [read-write]The line width for this data sprite.
Implementation public function get lineWidth():Number
public function set lineWidth(value:Number):void
| _points | property |
protected var _points:ArrayOptional array of x,y values for specifying arbitrary shapes.
| points | property |
points:Array [read-write]Optional array of x,y values for specifying arbitrary shapes.
Implementation public function get points():Array
public function set points(value:Array):void
| _prop | property |
protected var _prop:ObjectObject for attaching additional properties to this sprite.
| props | property |
props:Object [read-write]Object for attaching additional properties to this sprite.
Implementation public function get props():Object
public function set props(value:Object):void
| _renderer | property |
protected var _renderer:IRendererThe renderer for drawing this DataSprite.
| renderer | property |
renderer:IRenderer [read-write]The renderer for drawing this DataSprite.
Implementation public function get renderer():IRenderer
public function set renderer(value:IRenderer):void
| _shape | property |
protected var _shape:String = "circle"Code indicating the shape value of this data sprite.
| shape | property |
shape:String [read-write]Name of the shape value of this data sprite.
Implementation public function get shape():String
public function set shape(value:String):void
See also
| _size | property |
protected var _size:Number = 1The size value of this data sprite (1 by default).
| size | property |
size:Number [read-write]The size value of this data sprite (1 by default).
Implementation public function get size():Number
public function set size(value:Number):void
| _u | property |
protected var _u:Number = 0Auxiliary property often used as a shape parameter.
| u | property |
u:Number [read-write]Auxiliary property often used as a shape parameter.
Implementation public function get u():Number
public function set u(value:Number):void
| _v | property |
protected var _v:Number = 0Auxiliary property often used as a shape parameter.
| v | property |
v:Number [read-write]Auxiliary property often used as a shape parameter.
Implementation public function get v():Number
public function set v(value:Number):void
| _w | property |
protected var _w:Number = 0Auxiliary property often used as a width parameter.
| w | property |
w:Number [read-write]Auxiliary property often used as a width parameter.
Implementation public function get w():Number
public function set w(value:Number):void
| DataSprite | () | constructor |
public function DataSprite()Creates a new DataSprite.
| fix | () | method |
public function fix(num:uint = 1):voidIncrements the fixed counter. If the fixed counter is greater than zero, the data sprite should be fixed. A counter is used so that if different components both adjust the fixed settings, they won't overwrite each other.
Parametersnum:uint (default = 1) — the amount to increment the counter by (default 1)
|
| render | () | method |
public override function render():voidDraw this sprite's graphical content. Subclasses should override this method with custom drawing code.
| unfix | () | method |
public function unfix(num:uint = 1):voidDecrements the fixed counter. If the fixed counter is greater than zero, the data sprite should be fixed. A counter is used so that if different components both adjust the fixed settings, they won't overwrite each other. This method does not allow the fixed counter to go below zero.
Parametersnum:uint (default = 1) — the amount to decrement the counter by (default 1)
|