import { Component } from 'react'; import { TimeInterval } from 'd3-time'; export interface LinearAxisTickSeriesProps { height: number; width: number; scale: any; interval?: number | TimeInterval; tickSize: number; tickValues: any[]; orientation: 'horizontal' | 'vertical'; label: JSX.Element | null; line: JSX.Element | null; } interface ProcessedTick { text: string; fullText: string; position: [number, number]; half: 'start' | 'end' | 'center'; } export declare class LinearAxisTickSeries extends Component { static defaultProps: Partial; /** * Gets the adjusted scale given offsets. */ getAdjustedScale(): (d: any) => number; /** * Gets the x/y position for a given tick. */ getPosition(scaledTick: number): [number, number]; /** * Gets the dimension (height/width) this axis is calculating on. */ getDimension(): number; /** * Calculates the rotation angle that the ticks need to be shifted to. * This equation will measure the length of the text in a external canvas * object and determine what the longest label is and rotate until they fit. */ getRotationAngle(ticks: any[]): { angle: number; textLengths?: { [key: string]: number; }; }; /** * Gets the formatted label of the tick. */ getLabelFormat(): (label: string) => string; /** * Gets the ticks given the dimensions and scales and returns * the text and position. */ getTicks(): ProcessedTick[]; /** * Post processes the ticks to: * * - Ellipsis the labels if they are exceed a given length * - Filter out any ticks that might overlap each other. * */ postProcessTicks(ticks: ProcessedTick[], angle: number, textLengths?: { [key: string]: number; }): ProcessedTick[]; /** * Calculates whether the current tick will overlap with * the next tick. */ getTickOverlap(index: number, ticks: ProcessedTick[], angle: number, textLengths: { [key: string]: number; } | undefined, prevTick: ProcessedTick): boolean; render(): JSX.Element; } export {};