BarGraph Class

Used to create a simple bar graph.

Constructors

BarGraph( parent, config )
Used to instantiate this class
parentDOM element in which to render this component
configConfiguration settings (optional). See config options for more information.

Config Options

animate
animationSteps
maxHorizonalLabels

Events

onClick( val, idx, div )
Called whenever a bar in the graph is clicked.
onCellClick( idx, cell )
Called whenever a cell in the graph is clicked.

Public Methods

show( )
hide( )
add( value, label )
Used to add a value to the graph. Label is optional.
setValue( idx, value )
update( callback )
clear( saveColumns )
getCell( idx )
Returns a cell in the bargraph at a given index
select( idx )
Used to "select" a bar in the graph by adding the select style to the bar.
deselect( idx )
Used to "deselect" a bar in the graph by removing the select style from the bar.
selectAll( )
Used to "select" all the bars in the graph by adding the select style to the bars.
deselectAll( )
Used to "deselect" all the bars in the graph by removing the select style from all the bars.
getSelectedItems( )
Returns an array of selected items. Each item in the array includes the index, value, and cell
createLabel( val, idx, max, div )
Default implementation. Users can override.
getValues( )