import { XYComponentConfigInterface } from '../../core/xy-component/config'; import { AxisType } from './types'; import { Position } from '../../types/position'; import { FitMode, TrimMode, TextAlign } from '../../types/text'; export interface AxisConfigInterface extends Partial> { /** Axis position: `Position.Top`, `Position.Bottom`, `Position.Right` or `Position.Left`. Default: `undefined` */ position?: Position | `${Position}`; /** Axis type: `AxisType.X` or `AxisType.Y` */ type?: AxisType | `${AxisType}`; /** Extend the axis domain line to be full width or full height. Default: `true` */ fullSize?: boolean; /** Axis label. Default: `undefined` */ label?: string; /** Font size of the axis label as CSS string. Default: `null` */ labelFontSize?: string | null; /** Distance between the axis and the label in pixels. Default: `8` */ labelMargin?: number; /** Label text fit mode: `FitMode.Wrap` or `FitMode.Trim`. Default: `FitMode.Wrap`. */ labelTextFitMode?: FitMode | `${FitMode}`; /** Label text trim mode: `TrimMode.Start`, `TrimMode.Middle` or `TrimMode.End`. Default: `TrimMode.Middle` */ labelTextTrimType?: TrimMode | `${TrimMode}`; /** Label text wrapping separator. String or array of strings. Default: `undefined` */ labelTextSeparator?: string | string[]; /** Font color of the axis label as CSS string. Default: `null` */ labelColor?: string | null; /** Sets whether to draw the grid lines or not. Default: `true` */ gridLine?: boolean; /** Sets whether to draw the tick lines or not. Default: `true` */ tickLine?: boolean; /** Sets whether to draw the domain line or not. Default: `true` */ domainLine?: boolean; /** Draw only the min and max axis ticks. Default: `false` */ minMaxTicksOnly?: boolean; /** Show grid lines for the min and max axis ticks. Default: `false` */ minMaxTicksOnlyShowGridLines?: boolean; /** Draw only the min and max axis ticks, when the chart width is less than the specified value. * Has no effect when `tickTextAdaptiveSets` is enabled. * Default: `250` */ minMaxTicksOnlyWhenWidthIsLess?: number; /** Tick label formatter function. Default: `undefined` */ tickFormat?: ((tick: number | Date, i: number, ticks: number[] | Date[]) => string); /** Explicitly set tick values. Default: `undefined` */ tickValues?: number[]; /** Set the approximate number of axis ticks (will be passed to D3's axis constructor). Default: `undefined` */ numTicks?: number; /** Approximate spacing between ticks in pixels, used to derive the number of ticks * when `numTicks` is not set. Only applies to the X axis. Default: `175` */ tickSpacing?: number; /** Tick text fit mode: `FitMode.Wrap` or `FitMode.Trim`. Default: `FitMode.Wrap`. */ tickTextFitMode?: FitMode | `${FitMode}`; /** Maximum width in pixels for the tick text to be wrapped or trimmed. Default: `undefined` */ tickTextWidth?: number; /** Tick text wrapping separator. String or array of strings. Default: `undefined` */ tickTextSeparator?: string | string[]; /** Force word break for ticks when they don't fit. Default: `false` */ tickTextForceWordBreak?: boolean; /** Tick text trim mode: `TrimMode.Start`, `TrimMode.Middle` or `TrimMode.End`. Default: `TrimMode.Middle` */ tickTextTrimType?: TrimMode | `${TrimMode}`; /** Font size of the tick text as CSS string. Default: `null` */ tickTextFontSize?: string | null; /** Text alignment for ticks: `TextAlign.Left`, `TextAlign.Center` or `TextAlign.Right`. Default: `undefined` */ tickTextAlign?: TextAlign | `${TextAlign}` | ((tickValue: number | Date, tickIndex: number, tickValues: number[] | Date[], tickPosition: [number, number], componentWidth: number, componentHeight: number) => TextAlign | `${TextAlign}`); /** Font color of the tick text as CSS string. Default: `null` */ tickTextColor?: string | null; /** Text rotation angle for ticks. Default: `undefined` */ tickTextAngle?: number; /** Adaptively pick the number of ticks so that their labels don't overlap: the axis renders the * largest "nice" tick set that fits (measured off-screen), degrading to smaller sets on narrow * charts. `numTicks` (or its width-based default) acts as the upper bound. With explicit * `tickValues`, every-k-th subsets of them are fitted instead. * Has no effect when `minMaxTicksOnly` is set, and disables the width-based * `minMaxTicksOnlyWhenWidthIsLess` fallback. Default: `undefined` */ tickTextAdaptiveSets?: boolean; /** Hide tick labels that overlap with each other. * To define overlapping, a simple bounding box collision detection algorithm is used. * Which means the result won't be accurate when `tickTextAngle` is specified. * Consider combining with `tickTextAdaptiveSets` to keep the shown ticks evenly spaced. * Default: `undefined` */ tickTextHideOverlapping?: boolean; /** The spacing in pixels between the tick and it's label. Default: `8` */ tickPadding?: number; /** The size of the tick marks in pixels. Accepts a single number (applies to both inner and outer ticks) * or a tuple `[innerTickSize, outerTickSize]`. Default: `6` */ tickSize?: number | [number, number]; } export declare const AxisDefaultConfig: AxisConfigInterface;