A chart component for graphing an array of numeric data as a line graph.

Constructor

new (?parent:DisplayObjectContainer, ?xpos:Float, ?ypos:Float, ?data:Array<Float>)

Constructor

Parameters:

parent

The parent DisplayObjectContainer on which to add this Label.

xpos

The x position to place this component.

ypos

The y position to place this component.

data

The array of numeric values to graph.

Variables

lineColor:UInt

Sets/gets the color of the line in the graph.

lineWidth:Float

Sets/gets the width of the line in the graph.

Methods

get_lineWidth ():Float

set_lineColor (value:UInt):UInt

set_lineWidth (value:Float):Float

Inherited Variables

Defined by Chart

autoScale:Bool

Sets/gets whether the graph will automatically set its own max and min values based on the data values.

data:Array<Dynamic>

Sets/gets the data array.

gridColor:UInt

Sets / gets the color of the grid lines.

gridSize:Int

Sets / gets the size of the grid.

labelPrecision:Int

Sets/gets the amount of decimal places shown in the scale labels.

maximum:Float

Sets/gets the maximum value of the graph. Only used if autoScale is false.

minimum:Float

Sets/gets the minimum value of the graph. Only used if autoScale is false.

showGrid:Bool

Sets / gets whether or not the grid will be shown.

showScaleLabels:Bool

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.

Defined by Component

enabled:Bool

Sets/gets whether this component is enabled or not.

tag:Int

Sets/gets in integer that can identify the component.

Inherited Methods

Defined by Chart

draw ():Void

Draws the visual ui of the component.

get_data ():Array<Dynamic>

get_maximum ():Float

get_minimum ():Float

get_showGrid ():Bool

set_autoScale (value:Bool):Bool

set_data (value:Array<Dynamic>):Array<Dynamic>

set_gridColor (value:UInt):UInt

set_gridSize (value:Int):Int

set_labelPrecision (value:Int):Int

set_maximum (value:Float):Float

set_minimum (value:Float):Float

set_showGrid (value:Bool):Bool

set_showScaleLabels (value:Bool):Bool

Defined by Component

get_enabled ():Bool

get_height ():Float

get_tag ():Int

get_width ():Float

move (xpos:Float, ypos:Float):Void

Moves the component to the specified position.

Parameters:

xpos

the x position to move the component

ypos

the y position to move the component

setSize (w:Float, h:Float):Void

Sets the size of the component.

Parameters:

w

The width of the component.

h

The height of the component.

set_enabled (value:Bool):Bool

set_height (value:Float):Void

Sets/gets the height of the component.

set_tag (value:Int):Int

set_width (value:Float):Void

Sets/gets the width of the component.

set_x (value:Float):Void

Overrides the setter for x to always place the component on a whole pixel.

set_y (value:Float):Void

Overrides the setter for y to always place the component on a whole pixel.