mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
11 lines
255 B
TypeScript
11 lines
255 B
TypeScript
|
|
import { Chart, registerables } from 'chart.js';
|
|
|
|
let registered = false;
|
|
export async function registerChartComponents() {
|
|
if (registered) return;
|
|
if (process.client) {
|
|
Chart.register(...registerables);
|
|
registered = true;
|
|
}
|
|
} |