mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
add dashboard
This commit is contained in:
11
dashboard/composables/registerChartComponents.ts
Normal file
11
dashboard/composables/registerChartComponents.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
import { Chart, registerables } from 'chart.js';
|
||||
|
||||
let registered = false;
|
||||
export async function registerChartComponents() {
|
||||
if (registered) return;
|
||||
if (process.client) {
|
||||
Chart.register(...registerables);
|
||||
registered = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user