load new chart instead of new frappe.chart for es modules
This commit is contained in:
parent
435abbd983
commit
7a93eec0ae
15
README.md
15
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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user