| Package | com.bit101.charts |
| Class | public class Chart |
| Inheritance | Chart Component flash.display.Sprite |
| Subclasses | BarChart, LineChart, PieChart |
| Property | Defined By | ||
|---|---|---|---|
|
autoScale : Boolean
Sets/gets whether the graph will automatically set its own max and min values based on the data values.
|
Chart | ||
|
data : Array
Sets/gets the data array.
|
Chart | ||
![]() |
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | |
|
gridColor : uint
Sets / gets the color of the grid lines.
|
Chart | ||
|
gridSize : int
Sets / gets the size of the grid.
|
Chart | ||
![]() |
height : Number [override]
Sets/gets the height of the component.
|
Component | |
|
labelPrecision : int
Sets/gets the amount of decimal places shown in the scale labels.
|
Chart | ||
|
maximum : Number
Sets/gets the maximum value of the graph.
|
Chart | ||
|
minimum : Number
Sets/gets the minimum value of the graph.
|
Chart | ||
|
showGrid : Boolean
Sets / gets whether or not the grid will be shown.
|
Chart | ||
|
showScaleLabels : Boolean
Sets/gets whether or not labels for max and min graph values will be shown.
|
Chart | ||
![]() |
tag : int
Sets/gets in integer that can identify the component.
|
Component | |
![]() |
width : Number [override]
Sets/gets the width of the component.
|
Component | |
![]() |
x : Number [override] [write-only]
Overrides the setter for x to always place the component on a whole pixel.
|
Component | |
![]() |
y : Number [override] [write-only]
Overrides the setter for y to always place the component on a whole pixel.
|
Component | |
| Property | Defined By | ||
|---|---|---|---|
| _autoScale : Boolean = true | Chart | ||
| _chartHolder : Shape | Chart | ||
| _data : Array | Chart | ||
![]() |
_enabled : Boolean = true | Component | |
![]() |
_height : Number = 0 | Component | |
| _labelPrecision : int = 0 | Chart | ||
| _maximum : Number = 100 | Chart | ||
| _maxLabel : Label | Chart | ||
| _minimum : Number = 0 | Chart | ||
| _minLabel : Label | Chart | ||
| _panel : Panel | Chart | ||
![]() |
Ronda : Class | Component | |
| _showScaleLabels : Boolean = false | Chart | ||
![]() |
_tag : int = -1 | Component | |
![]() |
_width : Number = 0 | Component | |
| Method | Defined By | ||
|---|---|---|---|
|
Chart(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, data:Array = null)
Constructor
|
Chart | ||
|
draw():void
[override]
Draws the visual ui of the component.
|
Chart | ||
![]() |
initStage(stage:Stage):void
[static]
Utility method to set up usual stage align and scaling.
|
Component | |
![]() |
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
|
Component | |
![]() |
setSize(w:Number, h:Number):void
Sets the size of the component.
|
Component | |
| Method | Defined By | ||
|---|---|---|---|
|
addChildren():void
[override]
Creates and adds the child display objects of this component.
|
Chart | ||
|
drawChart():void
Graphs the numeric data in the chart.
|
Chart | ||
|
getMaxValue():Number
Gets the highest value of the numbers in the data array.
|
Chart | ||
|
getMinValue():Number
Gets the lowest value of the numbers in the data array.
|
Chart | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
|
Component | |
|
init():void
[override]
Initializes the component.
|
Chart | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | |
![]() |
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component | |
| _autoScale | property |
protected var _autoScale:Boolean = true
| _chartHolder | property |
protected var _chartHolder:Shape
| _data | property |
protected var _data:Array
| _labelPrecision | property |
protected var _labelPrecision:int = 0
| _maximum | property |
protected var _maximum:Number = 100
| _maxLabel | property |
protected var _maxLabel:Label
| _minimum | property |
protected var _minimum:Number = 0
| _minLabel | property |
protected var _minLabel:Label
| _panel | property |
protected var _panel:Panel
| _showScaleLabels | property |
protected var _showScaleLabels:Boolean = false
| autoScale | property |
autoScale:Boolean
Sets/gets whether the graph will automatically set its own max and min values based on the data values.
public function get autoScale():Boolean public function set autoScale(value:Boolean):void| data | property |
data:Array
Sets/gets the data array.
public function get data():Array public function set data(value:Array):void| gridColor | property |
gridColor:uint
Sets / gets the color of the grid lines.
public function get gridColor():uint public function set gridColor(value:uint):void| gridSize | property |
gridSize:int
Sets / gets the size of the grid.
public function get gridSize():int public function set gridSize(value:int):void| labelPrecision | property |
labelPrecision:int
Sets/gets the amount of decimal places shown in the scale labels.
public function get labelPrecision():int public function set labelPrecision(value:int):void| maximum | property |
maximum:Number
Sets/gets the maximum value of the graph. Only used if autoScale is false.
public function get maximum():Number public function set maximum(value:Number):void| minimum | property |
minimum:Number
Sets/gets the minimum value of the graph. Only used if autoScale is false.
public function get minimum():Number public function set minimum(value:Number):void| showGrid | property |
showGrid:Boolean
Sets / gets whether or not the grid will be shown.
public function get showGrid():Boolean public function set showGrid(value:Boolean):void| showScaleLabels | property |
showScaleLabels:Boolean
Sets/gets whether or not labels for max and min graph values will be shown. Note: these labels will be to the left of the x position of the chart. Chart position may need adjusting.
public function get showScaleLabels():Boolean public function set showScaleLabels(value:Boolean):void| Chart | () | Constructor |
public function Chart(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, data:Array = null)
Constructor
Parameters
parent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this Label.
|
|
xpos:Number (default = 0) — The x position to place this component.
|
|
ypos:Number (default = 0) — The y position to place this component.
|
|
data:Array (default = null) — The array of numeric values to graph.
|
| addChildren | () | method |
override protected function addChildren():void
Creates and adds the child display objects of this component.
| draw | () | method |
override public function draw():void
Draws the visual ui of the component.
| drawChart | () | method |
protected function drawChart():void
Graphs the numeric data in the chart. Override in subclasses.
| getMaxValue | () | method |
protected function getMaxValue():Number
Gets the highest value of the numbers in the data array.
ReturnsNumber |
| getMinValue | () | method |
protected function getMinValue():Number
Gets the lowest value of the numbers in the data array.
ReturnsNumber |
| init | () | method |
override protected function init():void
Initializes the component.