diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-01-02 10:18:47 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-01-02 10:18:47 +0900 |
| commit | 7a953392964f883c3b4c92cab165557f091090d6 (patch) | |
| tree | 5950d1555c0666564349e77aa47122de9804df8d /packages/frontend/src/scripts/init-chart.ts | |
| parent | fix style (diff) | |
| download | sharkey-7a953392964f883c3b4c92cab165557f091090d6.tar.gz sharkey-7a953392964f883c3b4c92cab165557f091090d6.tar.bz2 sharkey-7a953392964f883c3b4c92cab165557f091090d6.zip | |
enhance(client): user activity page
Diffstat (limited to 'packages/frontend/src/scripts/init-chart.ts')
| -rw-r--r-- | packages/frontend/src/scripts/init-chart.ts | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/init-chart.ts b/packages/frontend/src/scripts/init-chart.ts new file mode 100644 index 0000000000..32f887f2e7 --- /dev/null +++ b/packages/frontend/src/scripts/init-chart.ts @@ -0,0 +1,44 @@ +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, + ); +} |