@react-financial-charts/axes
Version:
Axes for react-financial-charts
72 lines (71 loc) • 2.77 kB
TypeScript
import { strokeDashTypes } from "@react-financial-charts/core";
import * as React from "react";
export interface XAxisProps<T extends number | Date> {
readonly axisAt?: number | "top" | "bottom" | "middle";
readonly className?: string;
readonly domainClassName?: string;
readonly fontFamily?: string;
readonly fontSize?: number;
readonly fontWeight?: number;
readonly getMouseDelta?: (startXY: [number, number], mouseXY: [number, number]) => number;
readonly gridLinesStrokeStyle?: string;
readonly gridLinesStrokeWidth?: number;
readonly gridLinesStrokeDasharray?: strokeDashTypes;
readonly innerTickSize?: number;
readonly onContextMenu?: (e: React.MouseEvent, mousePosition: [number, number]) => void;
readonly onDoubleClick?: (e: React.MouseEvent, mousePosition: [number, number]) => void;
readonly orient?: "top" | "bottom";
readonly outerTickSize?: number;
readonly showDomain?: boolean;
readonly showGridLines?: boolean;
readonly showTicks?: boolean;
readonly showTickLabel?: boolean;
readonly strokeStyle?: string;
readonly strokeWidth?: number;
readonly tickFormat?: (value: T) => string;
readonly tickPadding?: number;
readonly tickSize?: number;
readonly tickLabelFill?: string;
readonly ticks?: number;
readonly tickStrokeStyle?: string;
readonly tickStrokeWidth?: number;
readonly tickStrokeDasharray?: strokeDashTypes;
readonly tickValues?: number[];
readonly xZoomHeight?: number;
readonly zoomEnabled?: boolean;
readonly zoomCursorClassName?: string;
}
export declare class XAxis<T extends number | Date> extends React.Component<XAxisProps<T>> {
static defaultProps: {
axisAt: string;
className: string;
domainClassName: string;
fontFamily: string;
fontSize: number;
fontWeight: number;
getMouseDelta: (startXY: [number, number], mouseXY: [number, number]) => number;
gridLinesStrokeStyle: string;
gridLinesStrokeWidth: number;
orient: string;
outerTickSize: number;
innerTickSize: number;
showDomain: boolean;
showGridLines: boolean;
showTicks: boolean;
showTickLabel: boolean;
strokeStyle: string;
strokeWidth: number;
tickPadding: number;
tickLabelFill: string;
tickStrokeStyle: string;
xZoomHeight: number;
zoomEnabled: boolean;
zoomCursorClassName: string;
};
static contextType: React.Context<import("@react-financial-charts/core").ChartContextType>;
render(): JSX.Element;
private readonly axisZoomCallback;
private readonly helper;
private readonly getXTicks;
private readonly getXScale;
}