Chart is the generic component used for any chart type
- Source:
Methods
(static) addTooltip(d, e)
Adds a tooltip to the SVG
Parameters:
Name | Type | Description |
---|---|---|
d |
Object | dataset |
e |
Object | event x and y coordinates |
- Source:
(static) clearAxis()
Remove x and y axes
- Source:
(static) clearCanvas()
Remove all content from the SVG
- Source:
(static) displayHeight() → {number}
Gets the height of the dispaly area
- Source:
Returns:
Height of the chart display
- Type
- number
(static) drawTitle()
Appends title and subtitle to the chart
- Source:
(static) ds() → {Object}
Dataset getter function
- Source:
Returns:
normalized dataset
- Type
- Object
(static) generateLegend(cs)
Generate legend if option -legends- defined as true
Parameters:
Name | Type | Description |
---|---|---|
cs |
Object | configuration of the coordinate system |
- Source:
(static) header() → {number}
Gets the combined height of the title and subtitle
- Source:
Returns:
Total header height
- Type
- number
(static) height() → {number}
Height getter function
- Source:
Returns:
Chart Height
- Type
- number
(static) initalizeChart()
Generate a new Chart of type chartType
- Source:
(static) max() → {number}
Get the maxium value for metric
- Source:
Returns:
Max value for metric
- Type
- number
(static) min() → {number}
Get the minimum value for dataset
- Source:
Returns:
Min value for metric
- Type
- number
(static) refreshChart()
Redraw the Chart when the data is recycled
- Source:
(static) removeTooltip(d)
Removes all tooltips from the SVG
Parameters:
Name | Type | Description |
---|---|---|
d |
Object | dataset |
- Source:
(static) subtitleHeight() → {number}
Gets the subtitle height
- Source:
Returns:
Height of chart subtitle
- Type
- number
(static) titleHeight() → {number}
Gets the height of the title
- Source:
Returns:
Height of the chart title
- Type
- number
(static) width() → {number}
Width getter function
- Source:
Returns:
Chart width
- Type
- number