UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

51 lines 1.3 kB
import type { CSSProperties, ReactNode } from 'react'; import type { Margins } from '../types.js'; export interface PlotProps { /** * Width of the SVG in pixels. */ width: number; /** * Height of the SVG in pixels. */ height: number; /** * Color scheme used to pick colors for the series. * Defaults to the "schemeSet1" from "d3-scale-chromatic". */ colorScheme?: Iterable<string>; /** * Margins around the plot. */ margin?: Partial<Margins>; /** * Style applied to the SVG element. */ svgStyle?: CSSProperties; /** * Id of the SVG element. */ svgId?: string; /** * Class name of the SVG element. */ svgClassName?: string; /** * Style applied to the rectangle around the entire plot. */ plotViewportStyle?: CSSProperties; /** * Style applied to the rectangle around the series viewport. */ seriesViewportStyle?: CSSProperties; /** * Id of the parent PlotController that will control this plot. */ controllerId?: string; /** * All plot elements. */ children: ReactNode; } export declare function Plot(props: PlotProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=Plot.d.ts.map