Packageoutput
Classpublic class DataVisualizer
InheritanceDataVisualizer Inheritance flash.display.Sprite

DataVisualizer class provides functionality for drawing all diagramm elements.



Public Properties
 PropertyDefined by
  bars : Array
[static] The array of references to the diagram bars.
DataVisualizer
  blocks : Array
[static] The array of references to update blocks.
DataVisualizer
  dataZone : Sprite
[static] The reference to the sprite containing diagram bars.
DataVisualizer
  diagramHeight : Number
[static] The height of diagram zone.
DataVisualizer
  diagramWidth : Number
[static] The width of diagram zone.
DataVisualizer
  levelZone : Sprite
[static] The reference to the sprite containing level lines.
DataVisualizer
  parser : ResponseParser
[static] The reference to the current ResponseParser object.
DataVisualizer
  texts : Array
[static] The array of references to the texts under the bars.
DataVisualizer
Public Methods
 MethodDefined by
  
DataVisualizer($zone:Sprite, $responseParser:ResponseParser)
Creates the DataVisualizer instance.
DataVisualizer
  
drawLevels($parser:ResponseParser, useRequired:Boolean = false):void
[static] Draws Minimum and Goal production level lines.
DataVisualizer
  
drawRequired():void
[static] Draws Required production level lines if this is allowed by settings.
DataVisualizer
  
getColWidth($numCols:uint):Number
[static] Calculates the column width using the number of columns.
DataVisualizer
  
makeUpdate(was:* = null):void
Runs an update mechanism.
DataVisualizer
  
setColors():void
[static] Updates colors of the bars according to the level achieved.
DataVisualizer
  
visualizeData($dataObject:Object = null):void
[static] Creates the set of bars and text under them.
DataVisualizer
  
visualizeUpdate($numArray:Array):void
[static] Creates the set of bars and text under them.
DataVisualizer
Property detail
barsproperty
public static var bars:Array

The array of references to the diagram bars.

blocksproperty 
public static var blocks:Array

The array of references to update blocks.

dataZoneproperty 
public static var dataZone:Sprite

The reference to the sprite containing diagram bars.

diagramHeightproperty 
public static var diagramHeight:Number

The height of diagram zone.

diagramWidthproperty 
public static var diagramWidth:Number

The width of diagram zone.

levelZoneproperty 
public static var levelZone:Sprite

The reference to the sprite containing level lines.

parserproperty 
public static var parser:ResponseParser

The reference to the current ResponseParser object.

textsproperty 
public static var texts:Array

The array of references to the texts under the bars.

Constructor detail
DataVisualizer()constructor
public function DataVisualizer($zone:Sprite, $responseParser:ResponseParser)

Creates the DataVisualizer instance.

Parameters
$zone:Sprite — The sprite to draw in
 
$responseParser:ResponseParser — The ResponseParser instance to parse data.
Method detail
drawLevels()method
public static function drawLevels($parser:ResponseParser, useRequired:Boolean = false):void

Draws Minimum and Goal production level lines.

Parameters
$parser:ResponseParser — the ResponseParser item to use
 
useRequired:Boolean (default = false) — [not used]
drawRequired()method 
public static function drawRequired():void

Draws Required production level lines if this is allowed by settings.

getColWidth()method 
public static function getColWidth($numCols:uint):Number

Calculates the column width using the number of columns.

Parameters
$numCols:uint — The number of columns.

Returns
Number — Column width.
makeUpdate()method 
public function makeUpdate(was:* = null):void

Runs an update mechanism.

Parameters
was:* (default = null) — [Added for the use of the function as an event handler]
setColors()method 
public static function setColors():void

Updates colors of the bars according to the level achieved.

visualizeData()method 
public static function visualizeData($dataObject:Object = null):void

Creates the set of bars and text under them.

Parameters
$dataObject:Object (default = null) — [currently not used]
visualizeUpdate()method 
public static function visualizeUpdate($numArray:Array):void

Creates the set of bars and text under them.

Parameters
$numArray:Array — The array of numbers specifying the growth of values for every person during the period between updates.