BaseChart

App.Chart.Type. BaseChart

Base chart type.

Constructor

new BaseChart()

Methods

defaultResponsiveOptions() → {Object}

Returns:
Type
Object

options(config, data, container) → {Object}

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}

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}

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)

Parameters:
Name Type Description
plugins
config
data
container

transformData(data) → {Array}

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

validateData(data) → {Boolean}

Validates if the data for the chart is valid.

Parameters:
Name Type Description
data Array

Data for chart

Returns:

True if valid

Type
Boolean