UNPKG

react-native-chart-kit

Version:

Beautiful React Native charts for dashboards, reports, and data-rich mobile apps.

29 lines 1.53 kB
import type { ChartXValue, NormalizedDataPoint, NormalizedSeries } from "../data"; import type { BuildAreaPathOptions, GeometryPoint, LineCurve, LinePathModel } from "./types"; export type ProjectedLinePoint<TData = unknown> = GeometryPoint<TData> & { dataIndex: number; seriesKey: string; xValue: ChartXValue; }; export type ProjectScale<TData = unknown> = (value: ChartXValue, point: NormalizedDataPoint<TData>) => number | undefined; export type ProjectValueScale<TData = unknown> = (value: number, point: NormalizedDataPoint<TData>) => number | undefined; export type BuildLineSeriesGeometryOptions<TData = unknown> = { series: NormalizedSeries<TData>; xScale: ProjectScale<TData>; yScale: ProjectValueScale<TData>; curve?: LineCurve; connectNulls?: boolean; dataIndexOffset?: number; pathDecimation?: BuildAreaPathOptions<ProjectedLinePoint<TData>>["decimation"]; areaBaselineY?: BuildAreaPathOptions<ProjectedLinePoint<TData>>["baselineY"]; }; export type LineSeriesGeometry<TData = unknown> = { key: string; label: string; color?: string; points: Array<ProjectedLinePoint<TData>>; line: LinePathModel<ProjectedLinePoint<TData>>; area?: LinePathModel<ProjectedLinePoint<TData>>; }; export declare const buildLineSeriesGeometry: <TData = unknown>({ series, xScale, yScale, curve, connectNulls, dataIndexOffset, pathDecimation, areaBaselineY }: BuildLineSeriesGeometryOptions<TData>) => LineSeriesGeometry<TData>; //# sourceMappingURL=lineSeries.d.ts.map