UNPKG

victory-native

Version:

A charting library for React Native with a focus on performance and customization.

28 lines (27 loc) 1.64 kB
import * as React from "react"; import { type ViewStyle, type StyleProp, type LayoutChangeEvent } from "react-native"; import type { ColorFields, InputFields, NumericalFields, StringKeyOf } from "../types"; import { type ChartTransformState } from "../cartesian/hooks/useChartTransformState"; import { type ChartExplicitSize } from "../shared/ChartExplicitSize"; import { type ChartLayoutModeProps } from "../shared/ChartLayoutModeProps"; type PolarChartBaseProps = { onLayout: ({ nativeEvent: { layout } }: LayoutChangeEvent) => void; hasMeasuredLayoutSize: boolean; canvasSize: { width: number; height: number; }; containerStyle?: StyleProp<ViewStyle>; canvasStyle?: StyleProp<ViewStyle>; transformState?: ChartTransformState; isHeadless: boolean; explicitSize?: ChartExplicitSize; }; type PolarChartProps<RawData extends Record<string, unknown>, LabelKey extends StringKeyOf<InputFields<RawData>>, ValueKey extends StringKeyOf<NumericalFields<RawData>>, ColorKey extends StringKeyOf<ColorFields<RawData>>> = { data: RawData[]; colorKey: ColorKey; labelKey: LabelKey; valueKey: ValueKey; } & ChartLayoutModeProps & Omit<PolarChartBaseProps, "canvasSize" | "onLayout" | "hasMeasuredLayoutSize" | "isHeadless">; export declare const PolarChart: <RawData extends Record<string, unknown>, LabelKey extends StringKeyOf<InputFields<RawData>>, ValueKey extends StringKeyOf<NumericalFields<RawData>>, ColorKey extends StringKeyOf<ColorFields<RawData>>>(props: React.PropsWithChildren<PolarChartProps<RawData, LabelKey, ValueKey, ColorKey>>) => React.JSX.Element; export {};