Chart
Direct Subclass:
The Chart object is the parent class for all types of Chart. It is used to initialise all of the base settings universal to all charts.
Constructor Summary
Public Constructor | ||
public |
constructor(jConfig: Object, aData: Array, sContainer: String, dContainer: Object) Constructor function that sets up the local object. |
Member Summary
Public Members | ||
public |
The chart's data |
|
public |
SVG d3 object for d3 operations on the chart |
|
public |
DOM reference to container element that wraps SVG |
|
public |
DOM reference to loader display element |
|
public |
SVG DOM object for displaying the chart |
|
public |
The current calculated height of the chart |
|
public |
The width before any browser resize |
|
public |
The current calculated inner height of the chart |
|
public |
The current calculated inner width of the chart |
|
public |
|
|
public |
Default time for d3 transitions on the chart |
|
public |
The current calculated width of the chart |
|
public |
The chart's config object |
|
public |
The padding for the chart within the container |
|
public |
|
|
public |
|
|
public |
Chart's tooltip object |
Method Summary
Public Methods | ||
public |
init(): * Check chart is ready and render. |
|
public |
Sets the local config options for the chart. |
|
public |
setContainer(dContainer: Object) Sets the local container object. |
|
public |
Sets the local data for the chart. |
|
public |
Sets the local chart dimensions based on the size of the container. |
|
public |
updateConfig(jConfig: JSON) Updates the local config for the chart. |
|
public |
updateData(aData: Array, bTransform: Boolean) Updates the local data for the chart. |
Public Constructors
Public Members
public d3Svg: Object source
SVG d3 object for d3 operations on the chart
Properties:
Name | Type | Attribute | Description |
d3Svg | * |
public dContainer: Object source
DOM reference to container element that wraps SVG
Properties:
Name | Type | Attribute | Description |
dContainer | * |
public dLoader: Object source
DOM reference to loader display element
Properties:
Name | Type | Attribute | Description |
dLoader | * |
public dSvg: Object source
SVG DOM object for displaying the chart
Properties:
Name | Type | Attribute | Description |
dSvg | * |
public iHeight: Number source
The current calculated height of the chart
Properties:
Name | Type | Attribute | Description |
iHeight | * |
public iInitialWidth: Number source
The width before any browser resize
Properties:
Name | Type | Attribute | Description |
iInitialWidth | * |
public iInnerHeight: Number source
The current calculated inner height of the chart
Properties:
Name | Type | Attribute | Description |
iInnerHeight | * |
public iInnerWidth: Number source
The current calculated inner width of the chart
Properties:
Name | Type | Attribute | Description |
iInnerWidth | * |
public iResizeOffset: * source
public iTransitionTime: Number source
Default time for d3 transitions on the chart
Properties:
Name | Type | Attribute | Description |
iTransitionTime | * |
public iWidth: Number source
The current calculated width of the chart
Properties:
Name | Type | Attribute | Description |
iWidth | * |
public jConfig: Object source
The chart's config object
Properties:
Name | Type | Attribute | Description |
jConfig | * |
public jPadding: Object source
The padding for the chart within the container
Properties:
Name | Type | Attribute | Description |
jPadding | * |
public oChartOutWatcher: * source
public oResizeWatcher: * source
Public Methods
public init(): * source
Check chart is ready and render.
Return:
* |
Throw:
chart not ready for initialisation |
public setConfig(jConfig: Object) source
Sets the local config options for the chart.
Params:
Name | Type | Attribute | Description |
jConfig | Object | JSON configuration object |
Throw:
missing configuration |
public setContainer(dContainer: Object) source
Sets the local container object.
Params:
Name | Type | Attribute | Description |
dContainer | Object | Required DOM element |
Throw:
invalid DOM element |
public setData(aData: Array, bTransform: Boolean) source
Sets the local data for the chart.
Throw:
missing data |
public setDimensions() source
Sets the local chart dimensions based on the size of the container.
Throw:
missing DOM element |