Skip to content

Variable: xaxisSchema ​

ts
const xaxisSchema: ObjectNode<{
  anchor: Attr<
    'y' | `y${number}` | 'free',
    {
      description: 'The y axis this axis is drawn against, or `free`. Defaults to the y axis of the first subplot using this axis.';
      dflt: 'y';
      editType: 'layout';
      extras: readonly ['free'];
    }
  >;
  automargin: Attr<
    | boolean
    | 'left'
    | 'right'
    | 'top'
    | 'bottom'
    | 'height'
    | 'width'
    | `left+${string}`
    | `right+${string}`
    | `top+${string}`
    | `bottom+${string}`
    | `height+${string}`
    | `width+${string}`,
    {
      description: 'Grow the figure margins so tick labels and the title fit (E4.2). `true` allows every direction; flags restrict it.';
      dflt: false;
      editType: EditType;
      extras: readonly [true, false];
      flags: readonly ['height', 'width', 'left', 'right', 'top', 'bottom'];
    }
  >;
  autorange: Attr<
    boolean | 'reversed' | 'min reversed' | 'max reversed' | 'min' | 'max',
    {
      description: 'Whether the range is computed from the data. `reversed` autoranges with the axis flipped. `min`/`max` autorange only that end and take the other from `range` (`min reversed`/`max reversed` also flip the axis). Defaults to `false` when a full `range` is given, to `min`/`max` when one end of `range` is `null`, and to `reversed` on a y axis only `image` traces use (row 0 at the top, as in Plotly).';
      dflt: true;
      editType: EditType;
      values: readonly [true, false, 'reversed', 'min reversed', 'max reversed', 'min', 'max'];
    }
  >;
  autorangeoptions: ObjectNode<{
    clipmax: AttrSpec<unknown, unknown>;
    clipmin: AttrSpec<unknown, unknown>;
    include: AttrSpec<unknown, unknown>;
    maxallowed: AttrSpec<unknown, unknown>;
    minallowed: AttrSpec<unknown, unknown>;
  }>;
  autoshift: Attr<
    boolean,
    {
      description: "y axes with `anchor: 'free'` only: move the axis sideways so it does not overlap other free axes on the same side (and default `position` to the overlaid plot's edge, `automargin` to `true`, `shift` to ∓3 px). Plotly semantics.";
      editType: EditType;
    }
  >;
  autotickangles: AttrSpec<number[], number[]>;
  autotypenumbers: Attr<
    'convert types' | 'strict',
    {
      description: "How type detection treats numeric strings: `convert types` counts `'12'` as a number; `strict` counts only real numbers, so numeric strings make a `category` axis.";
      dflt: 'convert types';
      editType: 'calc';
      values: readonly ['convert types', 'strict'];
    }
  >;
  categoryarray: AttrSpec<DataArray, DataArray | undefined>;
  categoryorder: Attr<
    | 'array'
    | 'trace'
    | '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',
    {
      description: 'Order of categories: as they first appear in the traces (`trace`), alphabetical/numerical (`category ascending|descending`), `categoryarray` first (`array`), or by an aggregate of the trace values per category (`total`, `min`, `max`, `sum`, `mean`, `median`). Defaults to `array` when `categoryarray` is set, else `trace`.';
      editType: 'calc';
      values: readonly [
        'trace',
        'category ascending',
        'category descending',
        'array',
        '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: Attr<
    string,
    {
      description: 'Base color of the axis: the default for `linecolor`, `tickcolor`, `zerolinecolor`, `dividercolor` and (when changed) the tick-label and title font colors.';
      dflt: '#444';
      editType: 'ticks';
    }
  >;
  constrain: Attr<
    'range' | 'domain',
    {
      description: 'How a `scaleanchor` / `matches` constraint is met on this axis: `range` widens the range, `domain` shrinks the axis (and its subplot) inside its `domain`. Default `domain` on the axes of `image` traces (Plotly).';
      dflt: 'range';
      editType: EditType;
      values: readonly ['range', 'domain'];
    }
  >;
  constraintoward: Attr<
    'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom',
    {
      description: 'Which end stays put when a constraint changes the range or domain: `left`/`center`/`right` for x axes (default `center`), `bottom`/`middle`/`top` for y axes (default `middle`).';
      editType: EditType;
      values: readonly ['left', 'center', 'right', 'top', 'middle', 'bottom'];
    }
  >;
  dividercolor: Attr<
    string,
    {
      description: 'Multicategory divider color. Defaults to `color`.';
      editType: 'ticks';
    }
  >;
  dividerwidth: Attr<
    number,
    {
      description: 'Multicategory divider width in px.';
      dflt: 1;
      editType: 'ticks';
      min: 0;
    }
  >;
  domain: AttrSpec<[number, number], [number, number]>;
  dtick: AttrSpec<unknown, unknown>;
  exponentformat: Attr<
    'none' | 'e' | 'E' | 'power' | 'SI' | 'B',
    {
      description: 'How large and small numbers are written: `none` (1000000), `e` (1e+6), `E` (1E+6), `power` (1×10⁶), `SI` (1M), `B` (like SI but 1B for 10⁹).';
      dflt: 'B';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      values: readonly ['none', 'e', 'E', 'power', 'SI', 'B'];
    }
  >;
  fixedrange: Attr<
    boolean,
    {
      description: 'Disables zoom and pan on this axis (drag, scroll, and modebar zoom leave its range alone).';
      dflt: false;
      editType: 'none';
    }
  >;
  gridcolor: Attr<
    string,
    {
      description: 'Grid line color.';
      dflt: '#eee';
      editType: 'ticks';
    }
  >;
  griddash: Attr<
    string,
    {
      description: 'Dash style: `solid`, `dot`, `dash`, `longdash`, `dashdot`, `longdashdot`, or a CSS-like list of dash lengths in px (`5px,10px,2px,2px`).';
      dflt: 'solid';
      editType: 'ticks';
    }
  >;
  gridwidth: Attr<
    number,
    {
      description: 'Grid line width in px.';
      dflt: 1;
      editType: 'ticks';
      min: 0;
    }
  >;
  hoverformat: Attr<
    string,
    {
      description: 'Format of this axis’ values in hover labels (same syntax as `tickformat`). Empty uses the tick format with extra precision.';
      dflt: '';
      editType: 'none';
    }
  >;
  layer: Attr<
    'above traces' | 'below traces',
    {
      description: 'Draw the axis line, ticks and labels above or below the traces. Grid lines are always below.';
      dflt: 'above traces';
      editType: 'plot';
      values: readonly ['above traces', 'below traces'];
    }
  >;
  linecolor: Attr<
    string,
    {
      description: 'Axis line color. Defaults to `color`.';
      editType: 'ticks';
    }
  >;
  linewidth: Attr<
    number,
    {
      description: 'Axis line width in px.';
      dflt: 1;
      editType: 'ticks';
      min: 0;
    }
  >;
  matches: Attr<
    string,
    {
      description: "Link this axis' range to another axis of the same type (`'x'`, `'x2'`, `'y'`, …): they autorange together over all their data, and zoom, pan and `relayout` of one move all. The linked axes share `range`, `autorange`, `rangemode`, `rangebreaks`, `constrain` and the category order. An axis that would create a loop, or a target of another type, is ignored.";
      editType: 'calc';
      noBlank: true;
      strict: true;
    }
  >;
  maxallowed: AttrSpec<unknown, unknown>;
  minallowed: AttrSpec<unknown, unknown>;
  minexponent: Attr<
    number,
    {
      description: 'Smallest decimal exponent written in exponent form (`SI`/`B` and exponent formats); smaller magnitudes are written out in full.';
      dflt: 3;
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      min: 0;
    }
  >;
  minor: ObjectNode<{
    dtick: AttrSpec<unknown, unknown>;
    gridcolor: Attr<
      string,
      {
        description: 'Minor grid color. Defaults to `gridcolor` blended halfway to the plot background.';
      }
    >;
    griddash: Attr<
      string,
      {
        description: 'Minor grid dash style. Defaults to `griddash`. Dash style: `solid`, `dot`, `dash`, `longdash`, `dashdot`, `longdashdot`, or a CSS-like list of dash lengths in px (`5px,10px,2px,2px`).';
      }
    >;
    gridwidth: Attr<
      number,
      {
        description: 'Minor grid width in px. Defaults to `gridwidth`.';
        min: 0;
      }
    >;
    nticks: Attr<
      number,
      {
        description: 'Maximum number of minor ticks per major interval for `tickmode: auto` (0 picks it from the axis length).';
        dflt: 5;
        min: 0;
      }
    >;
    showgrid: Attr<
      boolean,
      {
        description: 'Draw minor grid lines.';
        dflt: false;
      }
    >;
    tick0: AttrSpec<unknown, unknown>;
    tickcolor: Attr<
      string,
      {
        description: 'Minor tick color. Defaults to `tickcolor`.';
      }
    >;
    ticklen: Attr<
      number,
      {
        description: 'Minor tick length in px. Defaults to 60% of `ticklen`.';
        min: 0;
      }
    >;
    tickmode: Attr<
      'auto' | 'linear' | 'array',
      {
        description: 'As the major `tickmode`. Defaults to `array` when `minor.tickvals` is set, `linear` when `minor.dtick` is set, else `auto`.';
        values: readonly ['auto', 'linear', 'array'];
      }
    >;
    ticks: Attr<
      '' | 'outside' | 'inside',
      {
        description: 'Draw minor tick marks outside or inside the plot area, or not at all.';
        dflt: '';
        values: readonly ['outside', 'inside', ''];
      }
    >;
    tickvals: AttrSpec<DataArray, DataArray | undefined>;
    tickwidth: Attr<
      number,
      {
        description: 'Minor tick width in px. Defaults to `tickwidth`.';
        min: 0;
      }
    >;
  }>;
  minorloglabels: Attr<
    'none' | 'small digits' | 'complete',
    {
      description: 'Log axes whose automatic ticks fall between powers of ten (2, 5 or every digit): `small digits` labels them with a small digit (2, 5), `complete` with the full value in the tick font, with `tickprefix`/`ticksuffix` (20, 50, 200), `none` leaves them unlabelled.';
      dflt: 'small digits';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      values: readonly ['small digits', 'complete', 'none'];
    }
  >;
  mirror: Attr<
    boolean | 'all' | 'ticks' | 'allticks',
    {
      description: 'Repeat the axis line on the opposite side of the plot area: `true` (line), `ticks` (line and ticks); `all`/`allticks` do the same on every subplot sharing this axis.';
      dflt: false;
      editType: EditType;
      values: readonly [true, 'ticks', false, 'all', 'allticks'];
    }
  >;
  nticks: Attr<
    number,
    {
      description: 'Maximum number of ticks for `tickmode: auto` (the actual number may be lower so steps stay round). 0 picks it from the axis length.';
      dflt: 0;
      editType: 'ticks';
      min: 0;
    }
  >;
  overlaying: AttrSpec<'x' | 'free' | `x${number}`, 'x' | 'free' | `x${number}` | undefined>;
  position: Attr<
    number,
    {
      description: 'Position of the axis in paper coordinates (0–1 across the y direction). Only used when `anchor` is `free`.';
      dflt: 0;
      editType: EditType;
      max: 1;
      min: 0;
    }
  >;
  range: AttrSpec<[unknown, unknown], [unknown, unknown] | undefined>;
  rangebreaks: ItemsNode<object & TemplatedItemChildren>;
  rangemode: Attr<
    'normal' | 'tozero' | 'nonnegative',
    {
      description: 'Linear axes only. `tozero` extends the autorange to include 0; `nonnegative` keeps it ≥ 0.';
      dflt: 'normal';
      editType: EditType;
      values: readonly ['normal', 'tozero', 'nonnegative'];
    }
  >;
  rangeselector: ObjectNode<{
    activecolor: Attr<
      string,
      {
        description: 'Background of the active button (the one whose range is in view) and of hovered buttons. Defaults to `bgcolor` darkened (light colors) or lightened (dark colors).';
      }
    >;
    bgcolor: Attr<
      string,
      {
        description: 'Background of the buttons.';
        dflt: '#eee';
      }
    >;
    bordercolor: Attr<
      string,
      {
        description: 'Border color of the buttons.';
        dflt: '#444';
      }
    >;
    borderwidth: Attr<
      number,
      {
        description: 'Border width of the buttons, px.';
        dflt: 0;
        min: 0;
      }
    >;
    buttons: ItemsNode<object & TemplatedItemChildren>;
    font: ObjectNode<{
      color: Attr<
        string,
        {
          description: 'Text color.';
        }
      >;
      family: Attr<
        string,
        {
          description: 'CSS font-family list. The renderer uses the first family it can load and falls back through the list.';
          noBlank: true;
          strict: true;
        }
      >;
      lineposition: Attr<
        | 'under'
        | 'over'
        | 'through'
        | 'none'
        | `under+${string}`
        | `over+${string}`
        | `through+${string}`,
        {
          description: 'Text decoration: `under`, `over` and/or `through` joined with `+` (e.g. `under+over`), or `none`.';
          extras: readonly ['none'];
          flags: readonly ['under', 'over', 'through'];
        }
      >;
      shadow: Attr<
        string,
        {
          description: 'CSS `text-shadow` behind the text (`2px 2px 3px black`; only the first shadow is drawn), `none`, or `auto` for a thin halo in the contrast color of the text.';
        }
      >;
      size: Attr<
        number,
        {
          description: 'Font size in CSS pixels.';
          min: 1;
        }
      >;
      style: Attr<
        'normal' | 'italic',
        {
          description: 'Font style.';
          values: readonly ['normal', 'italic'];
        }
      >;
      textcase: Attr<
        'normal' | 'word caps' | 'upper' | 'lower',
        {
          description: 'Letter case transform: `upper`, `lower`, `word caps` (first letter of each word), or `normal`.';
          values: readonly ['normal', 'word caps', 'upper', 'lower'];
        }
      >;
      variant: Attr<
        'normal' | 'small-caps' | 'all-small-caps' | 'all-petite-caps' | 'petite-caps' | 'unicase',
        {
          description: 'Capitals variant (CSS `font-variant-caps`). The SDF text renderer approximates small and petite caps with uppercase letters at a reduced size.';
          values: readonly [
            'normal',
            'small-caps',
            'all-small-caps',
            'all-petite-caps',
            'petite-caps',
            'unicase',
          ];
        }
      >;
      weight: Attr<
        number | 'normal' | 'bold',
        {
          description: 'Font weight: a CSS numeric weight (1–1000), `normal` or `bold`.';
          extras: readonly ['normal', 'bold'];
          max: 1000;
          min: 1;
        }
      >;
    }>;
    visible: Attr<
      boolean,
      {
        description: 'Show the range selector. Defaults to `true` when it has `buttons`.';
      }
    >;
    x: Attr<
      number,
      {
        description: 'Horizontal position in paper coordinates (fractions of the plot area width). Defaults to the start of the axis domain. Give `x` and `y` together; one alone is ignored.';
        max: 3;
        min: -2;
      }
    >;
    xanchor: Attr<
      'auto' | 'left' | 'center' | 'right',
      {
        description: 'Which side of the button row `x` refers to.';
        dflt: 'left';
        values: readonly ['auto', 'left', 'center', 'right'];
      }
    >;
    y: Attr<
      number,
      {
        description: 'Vertical position in paper coordinates. Defaults to just above the highest subplot on this x axis.';
        max: 3;
        min: -2;
      }
    >;
    yanchor: Attr<
      'auto' | 'top' | 'middle' | 'bottom',
      {
        description: 'Which side of the button row `y` refers to.';
        dflt: 'bottom';
        values: readonly ['auto', 'top', 'middle', 'bottom'];
      }
    >;
  }>;
  rangeslider: ObjectNode<{
    autorange: Attr<
      boolean,
      {
        description: 'Span every data point of the axis (its autorange, whatever the axis range in view). Defaults to `true` unless a full `range` is given.';
      }
    >;
    bgcolor: Attr<
      string,
      {
        description: 'Background of the slider. Defaults to `plot_bgcolor`.';
      }
    >;
    bordercolor: Attr<
      string,
      {
        description: 'Border color of the slider.';
        dflt: '#444';
      }
    >;
    borderwidth: Attr<
      number,
      {
        description: 'Border width of the slider, px.';
        dflt: 0;
        min: 0;
      }
    >;
    range: AttrSpec<[unknown, unknown], [unknown, unknown] | undefined>;
    thickness: Attr<
      number,
      {
        description: 'Height of the slider as a fraction of the figure height minus `margin.t` and `margin.b`. The bottom margin grows to make room for it.';
        dflt: 0.15;
        max: 1;
        min: 0;
      }
    >;
    visible: Attr<
      boolean,
      {
        description: 'Show the range slider. Defaults to `true` when `rangeslider` is given (`rangeslider: {}` is enough) or the axis has an `ohlc` or `candlestick` trace, else `false`.';
      }
    >;
    yaxis: ObjectNode<{
      range: AttrSpec<[unknown, unknown], [unknown, unknown] | undefined>;
      rangemode: Attr<
        'auto' | 'fixed' | 'match',
        {
          description: "The y range of this subplot's thumbnail: `match` follows the y axis range in view, `auto` spans all the y data (autorange), `fixed` uses `range`. Defaults to `fixed` with a valid `range`, else `match`.";
          values: readonly ['auto', 'fixed', 'match'];
        }
      >;
    }>;
  }>;
  scaleanchor: AttrSpec<unknown, unknown>;
  scaleratio: Attr<
    number,
    {
      description: 'With `scaleanchor`: px per unit of this axis divided by px per unit of the anchor axis (2 makes one unit here twice as long).';
      dflt: 1;
      editType: EditType;
      min: 0;
    }
  >;
  separatethousands: Attr<
    boolean,
    {
      description: 'Always separate thousands (1,000). By default only numbers with 5 or more integer digits are separated.';
      dflt: false;
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
    }
  >;
  shift: Attr<
    number,
    {
      description: "y axes with `anchor: 'free'` only: extra horizontal offset in px (negative to the left). Defaults to -3 on the left and 3 on the right when `autoshift` is on, else 0.";
      editType: EditType;
    }
  >;
  showdividers: Attr<
    boolean,
    {
      description: 'Multicategory axes: draw divider lines between groups.';
      dflt: true;
      editType: 'ticks';
    }
  >;
  showexponent: Attr<
    'none' | 'all' | 'first' | 'last',
    {
      description: 'Which tick labels show the exponent.';
      dflt: 'all';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      values: readonly ['all', 'first', 'last', 'none'];
    }
  >;
  showgrid: Attr<
    boolean,
    {
      description: 'Draw grid lines at each tick.';
      dflt: true;
      editType: 'ticks';
    }
  >;
  showline: Attr<
    boolean,
    {
      description: 'Draw the axis line.';
      dflt: false;
      editType: EditType;
    }
  >;
  showspikes: Attr<
    boolean,
    {
      description: "Draw a spike line from the hovered point to this axis. Defaults to `false`, or `true` when any other `spike*` attribute is set or `hovermode` is this axis' unified mode (`x unified` for x axes).";
      editType: 'modebar';
    }
  >;
  showticklabels: Attr<
    boolean,
    {
      description: 'Show tick labels.';
      dflt: true;
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
    }
  >;
  showtickprefix: Attr<
    'none' | 'all' | 'first' | 'last',
    {
      description: 'Which tick labels get `tickprefix`.';
      dflt: 'all';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      values: readonly ['all', 'first', 'last', 'none'];
    }
  >;
  showticksuffix: Attr<
    'none' | 'all' | 'first' | 'last',
    {
      description: 'Which tick labels get `ticksuffix`.';
      dflt: 'all';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      values: readonly ['all', 'first', 'last', 'none'];
    }
  >;
  side: Attr<
    'top' | 'bottom',
    {
      description: 'Which side of the plot area the axis is drawn on.';
      dflt: 'bottom';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      values: readonly ['bottom', 'top'];
    }
  >;
  spikecolor: Attr<
    string,
    {
      description: "Spike line color. Defaults to the hovered point's color (or a contrasting color when that is too close to the background).";
      editType: 'none';
    }
  >;
  spikedash: Attr<
    string,
    {
      description: 'Spike line dash (`dot` in unified hover). Dash style: `solid`, `dot`, `dash`, `longdash`, `dashdot`, `longdashdot`, or a CSS-like list of dash lengths in px (`5px,10px,2px,2px`).';
      dflt: 'dash';
      editType: 'none';
    }
  >;
  spikemode: Attr<
    'toaxis' | 'across' | 'marker' | `toaxis+${string}` | `across+${string}` | `marker+${string}`,
    {
      description: '`toaxis`: from the point to the axis; `across`: across the whole plot area; `marker`: a dot on the axis. Combine with `+` (`across+marker`). Unified hover defaults to `across`.';
      dflt: 'toaxis';
      editType: 'none';
      flags: readonly ['toaxis', 'across', 'marker'];
    }
  >;
  spikesnap: Attr<
    'data' | 'cursor' | 'hovered data',
    {
      description: '`hovered data`: the spike follows the hovered point; `data`: the closest point within `spikedistance`, even when no label shows; `cursor`: the pointer position.';
      dflt: 'hovered data';
      editType: 'none';
      values: readonly ['data', 'cursor', 'hovered data'];
    }
  >;
  spikethickness: Attr<
    number,
    {
      description: 'Spike line width in px (1.5 in unified hover).';
      dflt: 3;
      editType: 'none';
    }
  >;
  tick0: AttrSpec<unknown, unknown>;
  tickangle: Attr<
    number | 'auto',
    {
      description: 'Tick-label rotation in degrees. `auto` rotates x-axis labels by the first `autotickangles` entry that avoids overlap.';
      dflt: 'auto';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      extras: readonly ['auto'];
    }
  >;
  tickcolor: Attr<
    string,
    {
      description: 'Tick color. Defaults to `color`.';
      editType: 'ticks';
    }
  >;
  tickfont: ObjectNode<{
    color: Attr<
      string,
      {
        description: 'Text color.';
      }
    >;
    family: Attr<
      string,
      {
        description: 'CSS font-family list. The renderer uses the first family it can load and falls back through the list.';
        noBlank: true;
        strict: true;
      }
    >;
    lineposition: Attr<
      | 'under'
      | 'over'
      | 'through'
      | 'none'
      | `under+${string}`
      | `over+${string}`
      | `through+${string}`,
      {
        description: 'Text decoration: `under`, `over` and/or `through` joined with `+` (e.g. `under+over`), or `none`.';
        extras: readonly ['none'];
        flags: readonly ['under', 'over', 'through'];
      }
    >;
    shadow: Attr<
      string,
      {
        description: 'CSS `text-shadow` behind the text (`2px 2px 3px black`; only the first shadow is drawn), `none`, or `auto` for a thin halo in the contrast color of the text.';
      }
    >;
    size: Attr<
      number,
      {
        description: 'Font size in CSS pixels.';
        min: 1;
      }
    >;
    style: Attr<
      'normal' | 'italic',
      {
        description: 'Font style.';
        values: readonly ['normal', 'italic'];
      }
    >;
    textcase: Attr<
      'normal' | 'word caps' | 'upper' | 'lower',
      {
        description: 'Letter case transform: `upper`, `lower`, `word caps` (first letter of each word), or `normal`.';
        values: readonly ['normal', 'word caps', 'upper', 'lower'];
      }
    >;
    variant: Attr<
      'normal' | 'small-caps' | 'all-small-caps' | 'all-petite-caps' | 'petite-caps' | 'unicase',
      {
        description: 'Capitals variant (CSS `font-variant-caps`). The SDF text renderer approximates small and petite caps with uppercase letters at a reduced size.';
        values: readonly [
          'normal',
          'small-caps',
          'all-small-caps',
          'all-petite-caps',
          'petite-caps',
          'unicase',
        ];
      }
    >;
    weight: Attr<
      number | 'normal' | 'bold',
      {
        description: 'Font weight: a CSS numeric weight (1–1000), `normal` or `bold`.';
        extras: readonly ['normal', 'bold'];
        max: 1000;
        min: 1;
      }
    >;
  }>;
  tickformat: Attr<
    string,
    {
      description: 'Tick-label format: a d3-format specifier for numbers (`.2f`, `~s`, `$,`) or a d3-time-format specifier for dates (`%b %Y`), plus `%{n}f` for `n` digits of fractional seconds and `%h` for the half year. Empty picks a format automatically.';
      dflt: '';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
    }
  >;
  tickformatstops: ItemsNode<object & TemplatedItemChildren>;
  ticklabelmode: Attr<
    'instant' | 'period',
    {
      description: 'Date axes: `instant` labels the tick instant; `period` centers each label in the period that starts at its tick (e.g. month names between month ticks).';
      dflt: 'instant';
      editType: 'ticks';
      values: readonly ['instant', 'period'];
    }
  >;
  ticklabeloverflow: Attr<
    'allow' | 'hide past div' | 'hide past domain',
    {
      description: 'What to do with labels that overflow: keep them, or hide those past the figure or the axis domain. Defaults to `hide past div` for outside labels and `hide past domain` for inside labels.';
      editType: 'ticks';
      values: readonly ['allow', 'hide past div', 'hide past domain'];
    }
  >;
  ticklabelposition: Attr<
    | 'outside'
    | 'inside'
    | 'outside top'
    | 'inside top'
    | 'outside left'
    | 'inside left'
    | 'outside right'
    | 'inside right'
    | 'outside bottom'
    | 'inside bottom',
    {
      description: 'Tick labels outside or inside the plot area, optionally shifted to one side of the tick (`top`/`bottom` for y axes, `left`/`right` for x axes).';
      dflt: 'outside';
      editType: EditType;
      values: readonly [
        'outside',
        'inside',
        'outside top',
        'inside top',
        'outside left',
        'inside left',
        'outside right',
        'inside right',
        'outside bottom',
        'inside bottom',
      ];
    }
  >;
  ticklabelshift: Attr<
    number,
    {
      description: 'Shift of tick labels along the axis, in px.';
      dflt: 0;
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
    }
  >;
  ticklabelstandoff: Attr<
    number,
    {
      description: 'Extra distance between tick labels and ticks, in px.';
      dflt: 0;
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
    }
  >;
  ticklabelstep: Attr<
    number,
    {
      description: 'Label every n-th tick only (`tickmode` `auto` and `linear`).';
      dflt: 1;
      editType: 'ticks';
      min: 1;
    }
  >;
  ticklen: Attr<
    number,
    {
      description: 'Tick length in px.';
      dflt: 5;
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
      min: 0;
    }
  >;
  tickmode: Attr<
    'auto' | 'linear' | 'array' | 'sync',
    {
      description: '`auto` picks up to `nticks` round ticks; `linear` places ticks from `tick0` every `dtick`; `array` uses `tickvals`/`ticktext`; `sync` aligns with the overlaid axis (reserved; behaves as `auto`). Defaults to `array` when `tickvals` is set, `linear` when `dtick` is set, else `auto`.';
      editType: 'ticks';
      values: readonly ['auto', 'linear', 'array', 'sync'];
    }
  >;
  tickprefix: Attr<
    string,
    {
      description: 'Text before each tick label.';
      dflt: '';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
    }
  >;
  ticks: Attr<
    '' | 'outside' | 'inside',
    {
      description: "Draw tick marks outside or inside the plot area, or not at all (`''`).";
      dflt: '';
      editType: EditType;
      values: readonly ['outside', 'inside', ''];
    }
  >;
  ticksuffix: Attr<
    string,
    {
      description: 'Text after each tick label.';
      dflt: '';
      editType: readonly (
        | 'none'
        | 'ticks'
        | 'legend'
        | 'calc'
        | 'calcIfAutorange'
        | 'crossTraceCalc'
        | 'layout'
        | 'plot'
        | 'style'
        | 'colorbars'
        | 'modebar'
        | 'camera'
      )[];
    }
  >;
  ticktext: AttrSpec<DataArray, DataArray | undefined>;
  tickvals: AttrSpec<DataArray, DataArray | undefined>;
  tickwidth: Attr<
    number,
    {
      description: 'Tick width in px.';
      dflt: 1;
      editType: 'ticks';
      min: 0;
    }
  >;
  title: ObjectNode<{
    font: ObjectNode<{
      color: Attr<
        string,
        {
          description: 'Text color.';
        }
      >;
      family: Attr<
        string,
        {
          description: 'CSS font-family list. The renderer uses the first family it can load and falls back through the list.';
          noBlank: true;
          strict: true;
        }
      >;
      lineposition: Attr<
        | 'under'
        | 'over'
        | 'through'
        | 'none'
        | `under+${string}`
        | `over+${string}`
        | `through+${string}`,
        {
          description: 'Text decoration: `under`, `over` and/or `through` joined with `+` (e.g. `under+over`), or `none`.';
          extras: readonly ['none'];
          flags: readonly ['under', 'over', 'through'];
        }
      >;
      shadow: Attr<
        string,
        {
          description: 'CSS `text-shadow` behind the text (`2px 2px 3px black`; only the first shadow is drawn), `none`, or `auto` for a thin halo in the contrast color of the text.';
        }
      >;
      size: Attr<
        number,
        {
          description: 'Font size in CSS pixels.';
          min: 1;
        }
      >;
      style: Attr<
        'normal' | 'italic',
        {
          description: 'Font style.';
          values: readonly ['normal', 'italic'];
        }
      >;
      textcase: Attr<
        'normal' | 'word caps' | 'upper' | 'lower',
        {
          description: 'Letter case transform: `upper`, `lower`, `word caps` (first letter of each word), or `normal`.';
          values: readonly ['normal', 'word caps', 'upper', 'lower'];
        }
      >;
      variant: Attr<
        'normal' | 'small-caps' | 'all-small-caps' | 'all-petite-caps' | 'petite-caps' | 'unicase',
        {
          description: 'Capitals variant (CSS `font-variant-caps`). The SDF text renderer approximates small and petite caps with uppercase letters at a reduced size.';
          values: readonly [
            'normal',
            'small-caps',
            'all-small-caps',
            'all-petite-caps',
            'petite-caps',
            'unicase',
          ];
        }
      >;
      weight: Attr<
        number | 'normal' | 'bold',
        {
          description: 'Font weight: a CSS numeric weight (1–1000), `normal` or `bold`.';
          extras: readonly ['normal', 'bold'];
          max: 1000;
          min: 1;
        }
      >;
    }>;
    standoff: Attr<
      number,
      {
        description: 'Distance in px between the tick labels and the title. By default it follows the tick labels automatically.';
        min: 0;
      }
    >;
    text: Attr<
      string,
      {
        description: 'Axis title text (supports rich-text tags, E2.10).';
        dflt: '';
      }
    >;
  }>;
  type: Attr<
    'linear' | '-' | 'log' | 'date' | 'category' | 'multicategory',
    {
      description: "Axis type. `'-'` detects the type from the data of the first trace on this axis (Plotly's rules: mostly dates → `date`; more than twice as many distinct strings as numbers → `category`; two-level `[[groups], [items]]` arrays → `multicategory`; otherwise `linear`).";
      dflt: '-';
      editType: 'calc';
      values: readonly ['-', 'linear', 'log', 'date', 'category', 'multicategory'];
    }
  >;
  visible: Attr<
    boolean,
    {
      description: 'Draw the axis (line, ticks, labels, grid and title). A hidden axis still maps data to pixels.';
      dflt: true;
      editType: EditType;
    }
  >;
  zeroline: Attr<
    boolean,
    {
      description: 'Draw a line at 0 (linear axes whose range contains 0).';
      dflt: true;
      editType: 'ticks';
    }
  >;
  zerolinecolor: Attr<
    string,
    {
      description: 'Zero line color. Defaults to `color`.';
      editType: 'ticks';
    }
  >;
  zerolinewidth: Attr<
    number,
    {
      description: 'Zero line width in px.';
      dflt: 1;
      editType: 'ticks';
      min: 0;
    }
  >;
}>;

Experimental

Cartesian x-axis schema (plan E3): the axis attributes plus the range slider and selector.

Released under the MIT License.