interface Axis {
    autorange: boolean | "reversed";
    calendar: Calendar;
    categoryarray: any[];
    categoryorder:
        | "trace"
        | "array"
        | "category ascending"
        | "category descending"
        | "total ascending"
        | "total descending"
        | "min ascending"
        | "min descending"
        | "max ascending"
        | "max descending"
        | "sum ascending"
        | "sum descending"
        | "mean ascending"
        | "mean descending"
        | "median ascending"
        | "median descending";
    color: Color;
    dividercolor: Color;
    dividerwidth: number;
    dtick: DTickValue;
    exponentformat:
        | "none"
        | "e"
        | "E"
        | "power"
        | "SI"
        | "B";
    fixedrange: boolean;
    gridcolor: Color;
    gridwidth: number;
    hoverformat: string;
    linecolor: Color;
    linewidth: number;
    minexponent: number;
    mirror:
        | boolean
        | "all"
        | "ticks"
        | "allticks";
    nticks: number;
    range: any[];
    rangemode: "normal" | "tozero" | "nonnegative";
    separatethousands: boolean;
    showdividers: boolean;
    showexponent:
        | "all"
        | "none"
        | "first"
        | "last";
    showgrid: boolean;
    showline: boolean;
    showspikes: boolean;
    showticklabels: boolean;
    showtickprefix:
        | "all"
        | "none"
        | "first"
        | "last";
    showticksuffix:
        | "all"
        | "none"
        | "first"
        | "last";
    spikecolor: Color;
    spikedash: string;
    spikemode:
        | "marker"
        | "toaxis"
        | "across"
        | "toaxis+across"
        | "toaxis+across+marker"
        | "across+marker"
        | "toaxis+marker";
    spikesnap: "data" | "cursor" | "hovered data";
    spikethickness: number;
    tick0: string | number;
    tickangle: number | "auto";
    tickcolor: Color;
    tickfont: Partial<Font>;
    tickformat: string;
    tickformatstops: Partial<TickFormatStop>[];
    ticklen: number;
    tickmode: "auto" | "linear" | "array";
    tickprefix: string;
    ticks: "" | "inside" | "outside";
    ticksuffix: string;
    ticktext: string[];
    tickvals: any[];
    tickwidth: number;
    title: string | Partial<DataTitle>;
    titlefont: Partial<Font>;
    type: AxisType;
    visible: boolean;
    zeroline: boolean;
    zerolinecolor: Color;
    zerolinewidth: number;
}

Hierarchy (view full)

Properties

autorange: boolean | "reversed"
calendar: Calendar
categoryarray: any[]
categoryorder:
    | "trace"
    | "array"
    | "category ascending"
    | "category descending"
    | "total ascending"
    | "total descending"
    | "min ascending"
    | "min descending"
    | "max ascending"
    | "max descending"
    | "sum ascending"
    | "sum descending"
    | "mean ascending"
    | "mean descending"
    | "median ascending"
    | "median descending"

Specifies the ordering logic for the case of categorical variables. By default, plotly uses trace, which specifies the order that is present in the data supplied. Set categoryorder to category ascending or category descending if order should be determined by the alphanumerical order of the category names. Set categoryorder to array to derive the ordering from the attribute categoryarray. If a category is not found in the categoryarray array, the sorting behavior for that attribute will be identical to the trace mode. The unspecified categories will follow the categories in categoryarray. Set categoryorder to total ascending or total descending if order should be determined by the numerical order of the values. Similarly, the order can be determined by the min, max, sum, mean or median of all the values.

color: Color

Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.

dividercolor: Color

Sets the color of the dividers Only has an effect on multicategory axes.

dividerwidth: number

Sets the width (in px) of the dividers Only has an effect on multicategory axes.

dtick: DTickValue
exponentformat:
    | "none"
    | "e"
    | "E"
    | "power"
    | "SI"
    | "B"

Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If none, it appears as 1,000,000,000. If e, 1e+9. If E, 1E+9. If power, 1x10^9 (with 9 in a super script). If SI, 1G. If B, 1B.

fixedrange: boolean

Determines whether or not this axis is zoom-able. If true, then zoom is disabled.

gridcolor: Color

Sets the color of the grid lines.

gridwidth: number

Sets the width (in px) of the grid lines.

hoverformat: string

Sets the hover text formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: %{n}f for fractional seconds with n digits. For example, "2016-10-13 09:15:23.456" with tickformat "%H~%M~%S.%2f" would display "09~15~23.46"

linecolor: Color

Sets the axis line color

linewidth: number

Sets the width (in px) of the axis line.

minexponent: number

Hide SI prefix for 10^n if |n| is below this number. This only has an effect when tickformat is "SI" or "B".

mirror:
    | boolean
    | "all"
    | "ticks"
    | "allticks"
nticks: number
range: any[]
rangemode: "normal" | "tozero" | "nonnegative"

'If normal, the range is computed in relation to the extrema of the input data. If tozero`, the range extends to 0, regardless of the input data If nonnegative, the range is non-negative, regardless of the input data. Applies only to linear axes.

separatethousands: boolean

'If true, even 4-digit integers are separated

showdividers: boolean

Determines whether or not a dividers are drawn between the category levels of this axis. Only has an effect on multicategory axes.

showexponent:
    | "all"
    | "none"
    | "first"
    | "last"

If all, all exponents are shown besides their significands. If first, only the exponent of the first tick is shown. If last, only the exponent of the last tick is shown. If none, no exponents appear.

showgrid: boolean

Determines whether or not grid lines are drawn. If true, the grid lines are drawn at every tick mark.

showline: boolean

Determines whether or not a line bounding this axis is drawn.

showspikes: boolean
showticklabels: boolean
showtickprefix:
    | "all"
    | "none"
    | "first"
    | "last"

If all, all tick labels are displayed with a prefix. If first, only the first tick is displayed with a prefix. If last, only the last tick is displayed with a suffix. If none, tick prefixes are hidden.

showticksuffix:
    | "all"
    | "none"
    | "first"
    | "last"

Same as showtickprefix but for tick suffixes.

spikecolor: Color
spikedash: string
spikemode:
    | "marker"
    | "toaxis"
    | "across"
    | "toaxis+across"
    | "toaxis+across+marker"
    | "across+marker"
    | "toaxis+marker"

Determines the drawing mode for the spike line. If toaxis, the line is drawn from the data point to the axis the series is plotted on. If across, the line is drawn across the entire plot area, and supercedes toaxis. If marker, then a marker dot is drawn on the axis the series is plotted on

spikesnap: "data" | "cursor" | "hovered data"

Determines whether spikelines are stuck to the cursor or to the closest datapoints.

spikethickness: number
tick0: string | number
tickangle: number | "auto"
tickcolor: Color
tickfont: Partial<Font>
tickformat: string

Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format We add one item to d3's date formatter: %{n}f for fractional seconds with n digits. For example, "2016-10-13 09:15:23.456" with tickformat "%H~%M~%S.%2f" would display "09~15~23.46"

tickformatstops: Partial<TickFormatStop>[]

Array of Partial<TickFormatStop> objects.

ticklen: number
tickmode: "auto" | "linear" | "array"

Ticks

tickprefix: string
ticks: "" | "inside" | "outside"
ticksuffix: string

Sets a tick label suffix.

ticktext: string[]
tickvals: any[]
tickwidth: number
title: string | Partial<DataTitle>
titlefont: Partial<Font>

Former titlefont is now the sub-attribute font of title. To customize title font properties, please use title.font now.

type: AxisType
visible: boolean

A single toggle to hide the axis while preserving interaction like dragging. Default is true when a cheater plot is present on the axis, otherwise false

zeroline: boolean

Determines whether or not a line is drawn at along the 0 value of this axis. If true, the zero line is drawn on top of the grid lines.

zerolinecolor: Color

Sets the line color of the zero line.

zerolinewidth: number

Sets the width (in px) of the zero line.