diff --git a/README.md b/README.md index d2ce1a0..ea3f923 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,21 @@ const chart = new frappe.Chart("#chart", { // or a DOM element, }) ``` +...or for es-modules: +```js + +//replace new frappe.Chart() with new Chart() +const chart = new Chart("#chart", { // or a DOM element, + // new Chart() in case of ES6 module with above usage + title: "My Awesome Chart", + data: data, + type: 'axis-mixed', // or 'bar', 'line', 'scatter', 'pie', 'percentage' + height: 250, + colors: ['#7cd6fd', '#743ee2'] +}) +``` + + If you want to contribute: 1. Clone this repo.