Module: vBarChart

Builds a Verticle Bar Chart.
Source:

Members

(inner) cs

The configuration of the coordinate system
Source:

(inner) svgContainer

The SVG that stores the chart
Source:

Methods

(inner) buildScales()

Builds the scales for the x and y axes
Source:

(inner) drawAxis()

Draws the x and y axes on the svg
Source:

(inner) enter(rects)

Runs when a new element is added to the dataset
Parameters:
Name Type Description
rects Object (svg element)
Source:

(inner) exit(rects)

Runs when an element is removed from the dataset
Parameters:
Name Type Description
rects Object (svg element)
Source:

(inner) getHeight(d)

Returns height of the bar
Parameters:
Name Type Description
d Object (svg element)
Source:

(inner) getWidth()

Returns width of the bar
Source:

(inner) getXCoord(d, i)

Returns x axis co-ordinate of the bar
Parameters:
Name Type Description
d Object (svg element)
i Object (svg element)
Source:

(inner) getYCoord(d)

Returns y axis co-ordinate of the bar
Parameters:
Name Type Description
d Object (svg element)
Source:

(inner) mouseOut(d)

Removes tooltip on mouse out
Parameters:
Name Type Description
d Object (svg element)
Source:

(inner) mouseOver(d)

Adds a tooltip on mouse over
Parameters:
Name Type Description
d Object (svg element)
Source:

(inner) transition(rects)

Runs when a value of an element in dataset is changed
Parameters:
Name Type Description
rects Object (svg element)
Source: