Documentation menu

Interface

AxisOptions

Options of an axis (plot.axis(name).applyOptions).

Properties

NameTypeDescription
type?'linear' | 'log' | 'category'
range?'auto' | [ number, number ]

'auto' follows the data (after a pan or zoom, until fit()); [lo, hi] is fixed.

includeZero?boolean

Automatic range: keep 0 inside.

margin?number

Automatic range: fraction added at both ends (default 0.05, category axes 0).

format?PlotFormat
inverted?boolean
visible?boolean
grid?boolean
title?string | null

null removes it.

locked?boolean

Panning and zooming leave the axis alone.

Declaration

export interface AxisOptions {
    type?: 'linear' | 'log' | 'category';
    range?: 'auto' | [
        number,
        number
    ];
    includeZero?: boolean;
    margin?: number;
    format?: PlotFormat;
    inverted?: boolean;
    visible?: boolean;
    grid?: boolean;
    title?: string | null;
    locked?: boolean;
}

Used by

Axis