-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
33 lines (30 loc) · 841 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//import {Chart, BarController, BarElement, CategoryScale, LinearScale, UpdateMode} from 'chart.js';
import Chart from 'chart.js/auto';
import annotationPlugin from 'chartjs-plugin-annotation';
import zoomPlugin from 'chartjs-plugin-zoom';
import ChartDataLabels from 'chartjs-plugin-datalabels';
//Chart.register(BarController, BarElement, CategoryScale, LinearScale);
Chart.register([ zoomPlugin, annotationPlugin, ChartDataLabels]);
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
//const a:UpdateMode = 'zoom';
export const chart = new Chart(ctx, {
type: 'bar',
data: {
labels: [],
datasets: [{
data: []
}]
},
options: {
plugins: false
/* plugins: {
tooltip: {},
legend: false,
annotation: { },
zoom: { },
datalabels: {}
}
*/
}
});