From 005e05d8fbd57c3d7a085c2af783db92f1ea3066 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 15 Oct 2024 04:21:53 +0100 Subject: [PATCH] ples work now xoxo --- .../src/components/chart/generic-chart.tsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/projects/website/src/components/chart/generic-chart.tsx b/projects/website/src/components/chart/generic-chart.tsx index c545180..539f9ba 100644 --- a/projects/website/src/components/chart/generic-chart.tsx +++ b/projects/website/src/components/chart/generic-chart.tsx @@ -1,23 +1,13 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ "use client"; -import { - BarElement, - CategoryScale, - Chart, - Legend, - LinearScale, - LineElement, - PointElement, - Title, - Tooltip, -} from "chart.js"; +import { Chart, registerables } from "chart.js"; +Chart.register(...registerables); + import { Line } from "react-chartjs-2"; import { useIsMobile } from "@/hooks/use-is-mobile"; import { formatDateMinimal, getDaysAgo, getDaysAgoDate, parseDate } from "@ssr/common/utils/time-utils"; -Chart.register(LinearScale, CategoryScale, PointElement, LineElement, BarElement, Title, Tooltip, Legend); - export type AxisPosition = "left" | "right"; export type DatasetDisplayType = "line" | "bar";