Search


Charts - Documentation

This component is used to generate a visual representation of data in a table.

Version
0.1
Status
Experimental
Technical name
[data-chart]

On this page

Working examples

How to implement

This section explains how you can implement the Charts component in your page.

Configuration

This section lists all possible configurations you can define for the component. Those configuration options must be added as attributes to either the component or other elements inside the component.

Name Description Type Default
data-chart-options

Defines the chart options. For more information and to see what properties are accepted, see the official Chart.js documentation.

Note: this configuration can only be added to the <table> element.

JSON Object No default value.
data-chart-data

Overrides the data defined in the <table> element. Use only if the chart generated by the component does not work as expected. For more information on how to structure your data, see the official Chart.js documentation.

Note: this configuration can only be added to the <table> element.

JSON Object No default value.
data-chart-set-options

Defines the configuration options for a given dataset. For more information and to see what properties are accepted, see the official Chart.js documentation.

Note: this configuration can only be added to a <th> element located inside the <thead> element of the table.

JSON Object No default value.
data-chart-set-ignore

If true, the entire dataset (table column) will be ignored and therefore not added to the chart.

Note: this configuration can only be added to a <th> element located inside the <thead> element of the table.

Boolean false
data-chart-value

Overrides the value defined in any given <th> or <td> element.

String No default value.
data-chart-details-open

Defines if the dynamically created <details> element should be open by default.

Boolean

If not defined, the <details> element will be closed.

If defined, the <details> element will be open.

Notes

Implementation plan

Page details

Date modified: