Area Chart
Display graphically quantitative data on your websites.
Official documentation
For more detailed information and examples, see the official documentation: Chartist .
How to use?
Copy-paste the stylesheets <link>
into your <head>
to load the CSS.
Copy-paste the following <script>
s near the end of your pages under JS Implementing Plugins to enable them.
Copy-paste the following <script>
near the end of your pages under JS Front to enable it.
Copy-paste the init function under JS Plugins Init., before the closing </body>
tag, to enable it.
Methods
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-series=""
.
Attribute | Description |
---|---|
|
The data on which the graphics will be based. Each value corresponds to a point on the graph. Also, this data is displayed in the tooltip that appears when you hover over the cursor.
Screenshot example:![]() |
|
Labels along the X axis.
Screenshot example:![]() |
|
Chart height. |
|
Chart height at resolution less than 768 px. |
|
Highest value on the chart.
Screenshot example:![]() |
|
The lowest value on the graph. Can be negative. In this case, the graph will go below the zero point.
Screenshot example:![]() |
|
The offset from the edge of the chart to the labels along the X axis. |
|
The offset from the edge of the chart to the labels along the Y axis. |
|
Postfix is put after each label on the Y axis.
Screenshot example:![]() |
|
Align labels to the X axis. Possible values:
|
|
Determines whether the graph itself is visible. |
|
Determines whether the strokes of the graphs are shown.
Screenshot example:![]() |
|
Determines whether the points on the graph are shown. |
|
Stretches the chart for the entire width of the grid. |
|
Determines whether lines will be displayed against the background of the chart along the X axis. |
|
Determines whether lines will be displayed against the background of the chart along the Y axis. |
|
Determines whether hover prompts specified in the data-series attribute are displayed. |
|
Determines which side of the description will be specified in the tooltip. Possible values:
|
|
Adds additional classes to the prompt. |
|
Opacity of the charts. |
|
Fill color. |
|
Stroke color. |
|
If the value of the attribute is 0, then the lines on the background are solid. If greater than 0, then determines the distance between the line generators lines. |
|
The font size for labels on the X axis. |
|
The font size for labels on the Y axis. |
|
The distance from the text to the chart is along the x-axis. |
|
The distance to the right of the text to the graph along the Y axis. |
|
The text color of labels in the Y axis. |
|
Colors of points on the graph. |