UNPKG

react-plot

Version:

Library of React components to render SVG 2D plots.

42 lines 1.74 kB
import type { CSSProperties, ReactNode } from 'react'; import type { Position, ScalarValue, TickLabelFormat, TickPosition } from '../../types.js'; export type AxisScale = 'linear' | 'log' | 'time'; export interface AxisProps { id?: string; position: Position; min?: number; max?: number; paddingStart?: ScalarValue; paddingEnd?: ScalarValue; flip?: boolean; scale?: AxisScale; /** * Hide all axis elements. */ hidden?: boolean; /** * Hide the line. */ hiddenLine?: boolean; lineStyle?: CSSProperties; label?: ReactNode; labelStyle?: CSSProperties; displayPrimaryGridLines?: boolean; primaryGridLineStyle?: CSSProperties; displaySecondaryGridLines?: boolean; secondaryGridLineStyle?: CSSProperties; hiddenTicks?: boolean; tickPosition?: TickPosition; /** * With time scale the default values is d3's smart tickFormat * With other types of scales the default is converting the value to a string */ tickLabelFormat?: TickLabelFormat | TickLabelFormat<Date>; tickLabelStyle?: CSSProperties; primaryTickLength?: number; primaryTickStyle?: CSSProperties; secondaryTickLength?: number; secondaryTickStyle?: CSSProperties; } export declare function Axis({ id, position, min, max, paddingStart, paddingEnd, flip, scale, label, displayPrimaryGridLines, primaryGridLineStyle, displaySecondaryGridLines, secondaryGridLineStyle, labelStyle, hidden, tickLabelStyle, tickLabelFormat, hiddenLine, lineStyle, hiddenTicks, tickPosition, primaryTickLength, primaryTickStyle, secondaryTickLength, secondaryTickStyle, }: AxisProps): import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=Axis.d.ts.map