UNPKG

react-native-chart-kit

Version:

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

39 lines 1.36 kB
import { type ChartXValue, type Size } from "../../../core/index"; import type { LineChartEdgeLabelPolicy, LineChartLabelStrategy, LineChartResolvedLabelStrategy } from "./types"; export declare const defaultLabelRotation = -35; export declare const xLabelRowGap = 6; export declare const xLabelBaselineOffset = 20; export type XLabelCandidate = { index: number; value: ChartXValue; text: string; x: number; size: Size; }; export type XLabelLayoutItem = XLabelCandidate & { gridX: number; y: number; row: number; rotation: number; textAnchor: "start" | "middle" | "end"; }; export type XLabelLayout = { strategy: LineChartResolvedLabelStrategy; items: XLabelLayoutItem[]; height: number; rotation: number; rows: number; }; export declare const dedupeXLabelCandidates: (candidates: XLabelCandidate[]) => XLabelCandidate[]; export declare const getMaxSize: (sizes: Size[]) => Size; export declare const resolveXLabelLayout: ({ candidates, plotWidth, chartWidth, strategy, rotation, edgeLabelPolicy, minGap, baseY }: { candidates: XLabelCandidate[]; plotWidth: number; chartWidth: number; strategy: LineChartLabelStrategy; rotation: number; edgeLabelPolicy: LineChartEdgeLabelPolicy; minGap: number; baseY: number; }) => XLabelLayout; //# sourceMappingURL=xLabels.d.ts.map