react-sparklines-ts
Version:
Beautiful and expressive Sparklines component for React (continued)
52 lines (51 loc) • 1.59 kB
TypeScript
import React, { type CSSProperties, PureComponent, type ReactElement } from "react";
import SparklinesBars from "./SparklinesBars";
import SparklinesCurve from "./SparklinesCurve";
import SparklinesLine from "./SparklinesLine";
import SparklinesNormalBand from "./SparklinesNormalBand";
import SparklinesReferenceLine from "./SparklinesReferenceLine";
import SparklinesSpots from "./SparklinesSpots";
import SparklinesText from "./SparklinesText";
export type SparklinesProps = {
data: number[];
limit?: number;
width?: number;
height?: number;
svgWidth?: number;
svgHeight?: number;
preserveAspectRatio?: string;
margin?: number;
style?: React.CSSProperties;
max?: number;
min?: number;
children: ReactElement;
};
export type PassedProps = {
data: number[];
points: {
x: number;
y: number;
}[];
width: number;
height: number;
margin: number;
};
export type SVGCSSProperties = CSSProperties & {
stroke?: string;
strokeWidth?: number;
fill?: string;
fillOpacity?: string | number;
strokeLinecap?: string;
strokeLinejoin?: string;
};
declare class Sparklines extends PureComponent<SparklinesProps> {
static defaultProps: {
data: never[];
width: number;
height: number;
preserveAspectRatio: string;
margin: number;
};
render(): import("react/jsx-runtime").JSX.Element | null;
}
export { Sparklines, SparklinesLine, SparklinesCurve, SparklinesBars, SparklinesSpots, SparklinesReferenceLine, SparklinesNormalBand, SparklinesText, };