This Chart Block provides a way of displaying data in charts.
- Make sure you have
git,node, andnpminstalled. - Clone this repository into your
\pluginsfolder. - Execute
npm installfrom the root directory of the repository to install the dependencies. - Execute
npm startfor development mode (npm run buildfor a production build). - Activate the
Chart Blockplugin in your WordPress plugin directory - While editing your page/post, add in the
Chart Blockblock and publish!
| Attribute | Descriptions |
|---|---|
| URL | The URL of a rest endpoint that returns Google Chart formatted data. |
| Title | Appears as the title of the card. |
| Notes | Comma separated list of items to appear under the chart. Used to communicate details about the chart. |
| Headings | Comma separated list of column headings that match the data. |
| Chart Type | The type of chart to render. Ie: ColumnChart |
| Options | A JSON object passed into Google Charts as options. |
This block currently uses Google Charts.
You can (optionally) use wp-env to set up a local environment.
- Install the node dependencies
npm install - Start the wp-env environment with
npm run wp-env start - Visit your new local environment at
http://localhost:8888
Chart Block is licensed under GNU General Public License v2 (or later).