Chart.js/types/tests/options.ts
Dan Onoshko 2031cdf051
Preparing the project for TypeScript (#10595)
* Add Typescript to the build
* Converts the `helpers.core` to Typescript as an example
* Converts the `core.element` to Typescript
2022-08-22 11:58:57 -04:00

34 lines
527 B
TypeScript

import { Chart } from '../../src/types';
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'
}
}
}
});