Chart.js/types/tests/options.ts
Dan Onoshko ce375a6876
feat: add ESM support (#10525)
* feat: add ESM support

* build: rename UMD bundle

* chore: edit supbackages description

* style: disable es/no-import-meta linter rule

* test: dynamic import in cjs module

* docs: edit integrations page

* docs: review fixes

* chore: remove useless regex in webpack config

* ci: test size-limit only for ESM bundle
2022-08-04 18:43:26 -04:00

34 lines
514 B
TypeScript

import { Chart } from '..';
const chart = new Chart('test', {
type: 'bar',
data: {
labels: ['a'],
datasets: [{
data: [1],
}, {
type: 'line',
data: [{ x: 1, y: 1 }]
}]
},
options: {
animation: {
duration: 500
},
backgroundColor: 'red',
datasets: {
line: {
animation: {
duration: 600
},
backgroundColor: 'blue',
}
},
elements: {
point: {
backgroundColor: 'red'
}
}
}
});