Edit this Page
This is a Demo Site with Custom Banner plugin

Shortcode Chart.js++ Plugin

About

The Shortcode Chart.js++ Plugin is an extension for Grav CMS. A shortcodes extension to add Chart.js charts to your Grav website.

Installation

Preferred way: GPM Installation

To install the plugin via the GPM, navigate to the root of your Grav-installation, and enter:

bin/gpm install shortcode-chart-js-plusplus

This will install this plugin into your /user/plugins-directory within Grav. Its files can be found under /your/site/grav/user/plugins/shortcode-chart-js-plusplus.

Manual Installation

NOTE: This plugin is a modular component for Grav which requires the Grav Shortcode Core Plugin
to be installed.

To install the plugin manually, download the zip-version of this repository and unzip it under /your/site/grav/user/plugins. Then rename the folder to shortcode-chart-js-plusplus. You can find these files on GitHub or via GetGrav.org.

via Admin Plugin

If you use the Admin Plugin, you can install the plugin directly by browsing the Plugins-menu and clicking on the Add button.

Configuration

Before configuring this plugin, you should copy the user/plugins/shortcode-chart-js-plusplus/shortcode-chart-js-plusplus.yaml to user/config/plugins/shortcode-chart-js-plusplus.yaml and only edit that copy.

Alternatively, use the Admin Plugin. It takes car of creating a file with your configuration named shortcode-chart-js-plusplus.yaml to be created in the user/config/plugins/-folder once the configuration is saved in the Admin.

Usage

You can use basically all Chart.js options as discribed here.
Have a look at the following examples.

Bar Chart


Doughnut


Line Chart


Radar


Credits

Couldn't be possible without the awesome Chart.js library. Thanks so much!
Code inspired by the old grav-plugin-shortcode-chartjs plugin, which doesn't seem to be developed any more.


0 Comments: