Builds a 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(rect)
Runs when an element is removed from the dataset
Parameters:
Name | Type | Description |
---|---|---|
rect |
Object | (svg element) |
- Source:
(inner) getHeight()
Returns height of the bar
- Source:
(inner) getMaxDimLength(accumulator, currentValue)
Get the maximum dimension length
Parameters:
Name | Type | Description |
---|---|---|
accumulator |
number | |
currentValue |
number |
- Source:
(inner) getWidth(d)
Returns width of the bar
Parameters:
Name | Type | Description |
---|---|---|
d |
Object | (svg element) |
- Source:
(inner) getYCoord(d, i)
Returns y axis co-ordinate of the bar
Parameters:
Name | Type | Description |
---|---|---|
d |
Object | (svg element) |
i |
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: