This commit is contained in:
parent
b803362360
commit
005e05d8fb
@ -1,23 +1,13 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
import { Chart, registerables } from "chart.js";
|
||||||
BarElement,
|
Chart.register(...registerables);
|
||||||
CategoryScale,
|
|
||||||
Chart,
|
|
||||||
Legend,
|
|
||||||
LinearScale,
|
|
||||||
LineElement,
|
|
||||||
PointElement,
|
|
||||||
Title,
|
|
||||||
Tooltip,
|
|
||||||
} from "chart.js";
|
|
||||||
import { Line } from "react-chartjs-2";
|
import { Line } from "react-chartjs-2";
|
||||||
import { useIsMobile } from "@/hooks/use-is-mobile";
|
import { useIsMobile } from "@/hooks/use-is-mobile";
|
||||||
import { formatDateMinimal, getDaysAgo, getDaysAgoDate, parseDate } from "@ssr/common/utils/time-utils";
|
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 AxisPosition = "left" | "right";
|
||||||
export type DatasetDisplayType = "line" | "bar";
|
export type DatasetDisplayType = "line" | "bar";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user