Apex charts
Modern & interactive Javascript charts to create beautiful representation of your data.
Usage
JS
In order to use this plugin on your page you will need to include the following script in the “Page JS” area from the page’s footer:
Initialization
Options
Here is a list with the data-*
attributes you can use in order to configure the chart without the need to modify any JavaScript file. Simply add the data-PARAMETER_NAME
attribute on the .spark-chart
div, where PARAMETER_NAME
is one of the options listed in the table below (e.g data-type="bar"
).
Parameter | Type | Default | Description |
---|---|---|---|
toggle |
string |
spark-chart |
Initializes the Apex Chart library with the given options. |
color |
string |
primary |
Use one of the given color modifier classes (e.g primary, info, success, warning, danger) |
type |
string |
line |
The spark chart type. It can be line or chart |
idataset |
array |
null |
Insert the chart’s values as an array (e.g data-dataset=”[20,30,40]”) |
idataset |
string |
null |
Insert the chart’s labels as strings separated by commas (e.g data-labels=”[1,2,3]”) |
height |
number |
35 |
Set a custom height |
Examples
Line
Spark charts
Initialize Apex Chart via data attributes or by creating a customized script following the official documentation. For now, we are offering a custom initialize feature via data attributes for spark charts.