mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
34 lines
524 B
TypeScript
34 lines
524 B
TypeScript
import { Chart } from '../index.esm';
|
|
|
|
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'
|
|
}
|
|
}
|
|
}
|
|
});
|