UNPKG

victory-native

Version:

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

16 lines (15 loc) 828 B
import { type LayoutChangeEvent } from "react-native"; import { type ChartExplicitSize } from "./ChartExplicitSize"; /** Runtime layout args after prop destructuring (wider than {@link ChartLayoutModeProps}). */ export type UseChartCanvasSizeProps = { explicitSize?: ChartExplicitSize; headless?: boolean; }; export type { ChartCanvasSize } from "./chartCanvasSizeUtils"; export { applyChartLayoutChange, getInitialChartCanvasSizeState, isChartHeadless, resolveChartCanvasSizeState, shouldWarnMissingHeadlessExplicitSize, } from "./chartCanvasSizeUtils"; export declare function useChartCanvasSize({ explicitSize, headless, }: UseChartCanvasSizeProps): { onLayout: ({ nativeEvent: { layout } }: LayoutChangeEvent) => void; isHeadless: boolean; size: ChartExplicitSize; hasMeasuredLayoutSize: boolean; };