From 534e20a072914af5a2951494a97aecad71dd62f9 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Sat, 10 Feb 2024 06:30:50 -0500 Subject: [PATCH] [+] Helper to register chartjs --- AquaNet/src/libs/ui.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 AquaNet/src/libs/ui.ts diff --git a/AquaNet/src/libs/ui.ts b/AquaNet/src/libs/ui.ts new file mode 100644 index 00000000..c25b6aaf --- /dev/null +++ b/AquaNet/src/libs/ui.ts @@ -0,0 +1,27 @@ +import { + Chart as ChartJS, + Title, + Tooltip, + Legend, + LineElement, + LinearScale, + PointElement, + CategoryScale, TimeScale, +} from 'chart.js'; + +export function title(t: string) { + document.title = `AquaNet - ${t}` +} + +export function registerChart() { + ChartJS.register( + Title, + Tooltip, + Legend, + LineElement, + LinearScale, + PointElement, + CategoryScale, + TimeScale + ); +} \ No newline at end of file