| Package | flare.vis.legend |
| Class | public class LegendRange |
| Inheritance | LegendRange RectSprite DirtySprite flash.display.Sprite |
| Implements | IScaleMap |
ColorPalette instance for creating a gradient of
color values. If the stats property
is set with the Stats object for a backing data
variable, a histogram of values will also be drawn in the legend
range. To draw only a histogram, set the palette
property to null.
| Property | Defined by | ||
|---|---|---|---|
![]() | angle : Number The angle value of this sprite's position in polar co-ordinates.
| DirtySprite | |
| borderColor : uint The color of the legend range border.
| LegendRange | ||
| bounds : Rectangle [read-only]
Bounds for the visual range portion of this legend range.
| LegendRange | ||
![]() | cornerHeight : Number The height of rounded corners.
| RectSprite | |
![]() | cornerSize : Number Sets corner width and height simultaneously.
| RectSprite | |
![]() | cornerWidth : Number The width of rounded corners.
| RectSprite | |
| dataField : String [read-only] The data field described by this legend range.
| LegendRange | ||
![]() | fillColor : uint The fill color of the rectangle.
| RectSprite | |
![]() | h : Number The height of the rectangle.
| RectSprite | |
![]() | height : Number
If dirty, this sprite is re-rendered before returning the height.
| DirtySprite | |
| histogramColor : uint The color of bars in a generated histogram.
| LegendRange | ||
| labels : Sprite [read-only] Sprite containing the range's labels.
| LegendRange | ||
| labelTextFormat : TextFormat Text format (font, size, style) of legend range labels.
| LegendRange | ||
| labelTextMode : int TextFormat (font, size, style) of legend range labels.
| LegendRange | ||
![]() | lineColor : uint The line color of the rectangle outline.
| RectSprite | |
![]() | linePixelHinting : Boolean Flag indicating if pixel hinting should be used for the outline.
| RectSprite | |
![]() | lineWidth : Number The line width of the rectangle outline.
| RectSprite | |
| margin : Number Margin value for padding within the legend item.
| LegendRange | ||
| orientation : String The desired orientation of this legend range.
| LegendRange | ||
![]() | origin : Point The origin point for polar coordinates.
| DirtySprite | |
![]() | radius : Number The radius value of this sprite's position in polar co-ordinates.
| DirtySprite | |
| rangeSize : Number The size of the range, this is either the width or height of
the range, depending on the current orientation.
| LegendRange | ||
| stats : Stats
Stats object describing the data range.
| LegendRange | ||
![]() | w : Number The width of the rectangle.
| RectSprite | |
![]() | width : Number
If dirty, this sprite is re-rendered before returning the width.
| DirtySprite | |
![]() | x : Number | DirtySprite | |
| x1 : Number [read-only]
Returns the x-coordinate corresponding to the lower end of the scale.
| LegendRange | ||
| x2 : Number [read-only]
Returns the x-coordinate corresponding to the upper end of the scale.
| LegendRange | ||
![]() | y : Number | DirtySprite | |
| y1 : Number [read-only]
Returns the y-coordinate corresponding to the lower end of the scale.
| LegendRange | ||
| y2 : Number [read-only]
Returns the y-coordinate corresponding to the upper end of the scale.
| LegendRange | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new LegendRange.
| LegendRange | ||
![]() |
dirty():void
Marks this sprite as "dirty" and in need of re-rendering.
| DirtySprite | |
![]() |
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.
| LegendRange | ||
![]() |
renderDirty(evt:Event = null):void
[static]
Frame render callback that renders all sprites on the dirty list.
| DirtySprite | |
![]() |
toString():String
| DirtySprite | |
|
updateLabels():void
Update the labels shown by this legend range.
| LegendRange | ||
|
value(x:Number, y:Number, stayInBounds:Boolean = true):Object
Returns the scale value corresponding to a given coordinate.
| LegendRange | ||
|
X(val:Object):Number
Returns the x-coordinate corresponding to the given scale value
| LegendRange | ||
|
Y(val:Object):Number
Returns the y-coordinate corresponding to the given scale value
| LegendRange | ||
| Method | Defined by | ||
|---|---|---|---|
|
drawHistogram(w:Number, h:Number):void
Draws a histogram of data values in the range dispay.
| LegendRange | ||
|
drawPalette(w:Number, h:Number):void
Draws a continuous color range in the range display.
| LegendRange | ||
| borderColor | property |
borderColor:uint [read-write]The color of the legend range border.
Implementation public function get borderColor():uint
public function set borderColor(value:uint):void
| bounds | property |
bounds:Rectangle [read-only]Bounds for the visual range portion of this legend range.
Implementation public function get bounds():Rectangle
| dataField | property |
dataField:String [read-only]The data field described by this legend range.
Implementation public function get dataField():String
| histogramColor | property |
histogramColor:uint [read-write]The color of bars in a generated histogram.
Implementation public function get histogramColor():uint
public function set histogramColor(value:uint):void
| labels | property |
labels:Sprite [read-only]Sprite containing the range's labels.
Implementation public function get labels():Sprite
| labelTextFormat | property |
labelTextFormat:TextFormat [read-write]Text format (font, size, style) of legend range labels.
Implementation public function get labelTextFormat():TextFormat
public function set labelTextFormat(value:TextFormat):void
| labelTextMode | property |
labelTextMode:int [read-write]TextFormat (font, size, style) of legend range labels.
Implementation public function get labelTextMode():int
public function set labelTextMode(value:int):void
| margin | property |
margin:Number [read-write]Margin value for padding within the legend item.
Implementation public function get margin():Number
public function set margin(value:Number):void
| orientation | property |
orientation:String [read-write]The desired orientation of this legend range.
Implementation public function get orientation():String
public function set orientation(value:String):void
| rangeSize | property |
rangeSize:Number [read-write]The size of the range, this is either the width or height of the range, depending on the current orientation.
Implementation public function get rangeSize():Number
public function set rangeSize(value:Number):void
| stats | property |
stats:Stats [read-write]Stats object describing the data range.
Implementation public function get stats():Stats
public function set stats(value:Stats):void
| x1 | property |
x1:Number [read-only]Returns the x-coordinate corresponding to the lower end of the scale.
Implementation public function get x1():Number
| x2 | property |
x2:Number [read-only]Returns the x-coordinate corresponding to the upper end of the scale.
Implementation public function get x2():Number
| y1 | property |
y1:Number [read-only]Returns the y-coordinate corresponding to the lower end of the scale.
Implementation public function get y1():Number
| y2 | property |
y2:Number [read-only]Returns the y-coordinate corresponding to the upper end of the scale.
Implementation public function get y2():Number
| LegendRange | () | constructor |
public function LegendRange(dataField:String, scale:Scale, palette:ColorPalette = null, orientation:String)Creates a new LegendRange.
ParametersdataField:String — the data field described by this range
|
|
scale:Scale — the color palette for the data field
|
|
palette:ColorPalette (default = null) — the Scale instance mapping the data field to a visual
variable
|
|
orientation:String |
| drawHistogram | () | method |
protected function drawHistogram(w:Number, h:Number):voidDraws a histogram of data values in the range dispay.
Parametersw:Number — the width of the range display
|
|
h:Number — the height of the range display
|
| drawPalette | () | method |
protected function drawPalette(w:Number, h:Number):voidDraws a continuous color range in the range display.
Parametersw:Number — the width of the range display
|
|
h:Number — the height of the range display
|
| render | () | method |
public override function render():voidDraw this sprite's graphical content. Subclasses should override this method with custom drawing code.
| updateLabels | () | method |
public function updateLabels():voidUpdate the labels shown by this legend range.
| value | () | method |
public function value(x:Number, y:Number, stayInBounds:Boolean = true):ObjectReturns the scale value corresponding to a given coordinate.
Parametersx:Number — the x-coordinate
|
|
y:Number — the y-coordinate
|
|
stayInBounds:Boolean (default = true) — if true, x,y values outside the current layout
bounds will be snapped to the bounds. If false, the value lookup
will attempt to extrapolate beyond the scale bounds. This value
is true be default.
|
Object — the scale value corresponding to the given coordinate.
|
| X | () | method |
public function X(val:Object):NumberReturns the x-coordinate corresponding to the given scale value
Parametersval:Object — the scale value to lookup
|
Number — the x-coordinate at which that scale value is placed
|
| Y | () | method |
public function Y(val:Object):NumberReturns the y-coordinate corresponding to the given scale value
Parametersval:Object — the scale value to lookup
|
Number — the y-coordinate at which that scale value is placed
|