This plugin integrates Chart.js into your GrapesJS editor 🚀🚀. You can add various types of charts 📊 to your projects and customize them according to your needs.
⭐ Star me on GitHub — it motivates me a lot!
grapesjs-chartjs-plugin
chartjs
chartjs-bar
chartjs-line
chartjs-pie
chartjs-doughnut
chartjs-polarArea
chartjs-radar
chartjs-bubble
chartjs-scatter
chartjsOptions
This object will be passed directly to the underlying Chart.js options
. See here for more info. { maintainAspectRatio: false }
blocks
Which blocks to add. [ "chartjs-bar", "chartjs-line", "chartjs-pie", "chartjs-doughnut", "chartjs-polarArea", "chartjs-radar", "chartjs-bubble", "chartjs-scatter" ]
category
Category name. By default the category
value of the i18n en
locale file will be used. { id: 'chartjs', label: "Charts" }
i18n
Object used to translate plugin properties. Check the en
locale file and follow its inner path. en
https://unpkg.com/grapesjs-chartjs-plugin
npm i grapesjs-chartjs-plugin
git clone https://github.com/fasenderos/grapesjs-chartjs-plugin.git
Directly in the browser
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet" /> <script src="https://unpkg.com/grapesjs"></script> <script src="https://unpkg.com/grapesjs-chartjs-plugin"></script> <div id="gjs"></div> <script type="text/javascript"> var editor = grapesjs.init({ container: "#gjs", // ... plugins: ["grapesjs-chartjs-plugin"], pluginsOpts: { "grapesjs-chartjs-plugin": { /* options */ }, }, }); </script>
Modern javascript
import grapesjs from 'grapesjs'; import plugin from 'grapesjs-chartjs-plugin'; import 'grapesjs/dist/css/grapes.min.css'; const editor = grapesjs.init({ container : '#gjs', // ... plugins: [plugin], pluginsOpts: { [plugin]: { /* options */ } } // or plugins: [ editor => plugin(editor, { /* options */ }), ], });
Clone the repository
$ git clone https://github.com/fasenderos/grapesjs-chartjs-plugin.git $ cd grapesjs-chartjs-plugin
Install dependencies
Start the dev server
Build the source
MIT
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4