react-native-chart-kit
Version:
Beautiful React Native charts for dashboards, reports, and data-rich mobile apps.
35 lines • 1.97 kB
TypeScript
import { solveChartBoxes } from "../../../core/index";
import type { Size } from "../../../core/index";
import type { ResolvedCartesianChartTheme } from "../../theme";
import type { LineChartLegendAlign, LineChartLegendRenderProps, LineChartLegendPosition, LineChartProps, LineChartRenderer, ResolvedLineChartLegendConfig } from "./types";
export declare const getLegendConfig: (legend: LineChartProps<Record<string, unknown>>["legend"], seriesCount: number, theme: ResolvedCartesianChartTheme) => ResolvedLineChartLegendConfig;
export declare const getLegendX: ({ align, boxes, legendWidth, width }: {
align: LineChartLegendAlign;
boxes: ReturnType<typeof solveChartBoxes>;
legendWidth: number;
width: number;
}) => number;
export declare const getLegendY: ({ boxes, xLabelHeight, xLabelLineHeight, legendHeight, position }: {
boxes: ReturnType<typeof solveChartBoxes>;
xLabelHeight: number;
xLabelLineHeight: number;
legendHeight: number;
position: LineChartLegendPosition;
}) => number;
export declare const renderConfiguredLegend: ({ legend, config, renderer }: {
legend: LineChartLegendRenderProps;
config: ResolvedLineChartLegendConfig;
renderer: LineChartRenderer;
}) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
export declare const buildLegendLayout: ({ config, items, maxWidth, measureText }: {
config: ResolvedLineChartLegendConfig;
items: Array<{
id: string;
label: string;
}>;
maxWidth: number;
measureText: (text: string, options: {
fontSize: number;
}) => Size;
}) => import("../../../core/index").LegendLayout;
//# sourceMappingURL=legend.d.ts.map