mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 11:13:08 +02:00
45 lines
728 B
TypeScript
45 lines
728 B
TypeScript
|
import {
|
||
|
Chart,
|
||
|
ArcElement,
|
||
|
LineElement,
|
||
|
BarElement,
|
||
|
PointElement,
|
||
|
BarController,
|
||
|
LineController,
|
||
|
DoughnutController,
|
||
|
CategoryScale,
|
||
|
LinearScale,
|
||
|
TimeScale,
|
||
|
Legend,
|
||
|
Title,
|
||
|
Tooltip,
|
||
|
SubTitle,
|
||
|
Filler,
|
||
|
} from 'chart.js';
|
||
|
import gradient from 'chartjs-plugin-gradient';
|
||
|
import zoomPlugin from 'chartjs-plugin-zoom';
|
||
|
import { MatrixController, MatrixElement } from 'chartjs-chart-matrix';
|
||
|
|
||
|
export function initChart() {
|
||
|
Chart.register(
|
||
|
ArcElement,
|
||
|
LineElement,
|
||
|
BarElement,
|
||
|
PointElement,
|
||
|
BarController,
|
||
|
LineController,
|
||
|
DoughnutController,
|
||
|
CategoryScale,
|
||
|
LinearScale,
|
||
|
TimeScale,
|
||
|
Legend,
|
||
|
Title,
|
||
|
Tooltip,
|
||
|
SubTitle,
|
||
|
Filler,
|
||
|
MatrixController, MatrixElement,
|
||
|
zoomPlugin,
|
||
|
gradient,
|
||
|
);
|
||
|
}
|