import { Widget } from "@meursyphus/flitter"; import { Custom as CartesianChartCustom, Theme as CartesianChartTheme, Scale as CartesianChartScale, Dependencies as CartesianChartDependencies } from "../../common/CartesianChart/types"; import type { ScatterConfig, ScatterProps } from "./components/Scatter"; import { Series, SeriesConfig } from "./components/Series"; import { Chart } from "./components/Chart"; import { Plot } from "./components/Plot"; import type { CustomConfig, CustomWidget } from "../../common/type"; export type Custom = CartesianChartCustom & { series: CustomSeries; scatter: CustomScatter; }; type CustomSeries = CustomConfig | CustomWidget<{ Line: (props: ScatterProps) => Widget; }, { scale: Scale; }, Theme, Data>; type CustomScatter = CustomConfig | CustomWidget<{}, { scale: Scale; } & ScatterProps, Theme, Data>; export type Theme = CartesianChartTheme; export type Data = { title?: string; datasets: { legend: string; data: { x: number; y: number; }[]; }[]; }; export type Scale = { x: CartesianChartScale; y: CartesianChartScale; }; export type Dependencies = Omit & { Series: (...props: ConstructorParameters) => Series; Plot: (...props: ConstructorParameters) => Plot; Chart: (...props: ConstructorParameters) => Chart; }; export {};