import React from "react"; import { styled, useTheme } from "@mui/material/styles"; import { ChartsLegendProps } from "@mui/x-charts/ChartsLegend"; import { DatasetType, MakeOptional } from "@mui/x-charts/internals"; import { LineChart as MuiLineChart } from "@mui/x-charts/LineChart"; import { LineSeriesType } from "@mui/x-charts/models/seriesType"; import { Granularity } from "../../types/dashboard"; import { getDateValueFormatter } from "../../util/timeline"; declare module "@mui/material/styles" { interface Palette { graphColorPrimary?: { main: string }; } } const StyledLineChart = styled(MuiLineChart, { name: "BananasChart", slot: "Chart", })(({ theme }) => theme.unstable_sx({ ".MuiChartsAxis-line, .MuiChartsAxis-tick": { opacity: 0, stroke: theme.palette.divider, }, }), ); export interface LineChartProps { dataset: DatasetType; series?: MakeOptional[]; dataKeyX: string; dataKeyY?: string; height?: number; area?: boolean; granularity?: Granularity; yAxisOptions?: object; legendProps?: ChartsLegendProps; } export const LineChart: React.FC = ({ dataset, series, dataKeyX, dataKeyY, height = 300, area, granularity = "day", yAxisOptions, legendProps, }) => { const theme = useTheme(); return ( ); }; export default LineChart;