Constructor
new BarChart()
Extends
Methods
defaultResponsiveOptions() → {Object}
- Inherited From:
Returns:
- Type
- Object
options(config, data, container) → {Object}
- Inherited From:
Builds options for the chart. Uses default options of the specific chart and applies custom ones on top.
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | Chart configuration |
data |
Array | Data for chart |
container |
Object | Conatiner element for the chart |
Returns:
The options for the chart and legend
- Type
- Object
render(container, config, data) → {Object}
- Inherited From:
Renders the chart.
Parameters:
Name | Type | Description |
---|---|---|
container |
Object | Conatiner element for the chart |
config |
Object | Configuration for chart and legend |
data |
Array | Data for chart |
Returns:
The chart object
- Type
- Object
responsiveOptions(config) → {Object}
- Inherited From:
Builds responsive options for the chart. Uses default responsive options of the specific chart and applies custom ones on top.
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | Chart configuration |
Returns:
The responsive options for the chart
- Type
- Object
setLegend(plugins, config, data, container)
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
plugins |
||
config |
||
data |
||
container |
transformData(data) → {Array}
- Inherited From:
Transforms the data. Can be overridden by specific chart types.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | Data in standard chartist format |
Returns:
The transformed data
- Type
- Array
type() → {string}
Returns:
- Type
- string
validateData(data) → {Boolean}
- Inherited From:
Validates if the data for the chart is valid.
Parameters:
Name | Type | Description |
---|---|---|
data |
Array | Data for chart |
Returns:
True if valid
- Type
- Boolean