@jsfkit/types
    Preparing search index...

    Type Alias ChartAxis

    An axis draws the ticks, labels, and gridlines for a scale.

    type ChartAxis = {
        crosses?: ChartAxisCrossing;
        displayUnits?: number | "percent";
        displayUnitsLabel?: ChartTitle;
        gridlines?: { major?: Line; minor?: Line };
        hidden?: boolean;
        id: string;
        multiLevelLabels?: boolean;
        numberFormat?: string;
        orient: "top" | "right" | "bottom" | "left" | "depth";
        scale: string;
        shape?: Shape;
        sourceLinked?: boolean;
        textStyle?: ChartTextStyle;
        tickLabels?: {
            align?: "center" | "left" | "right";
            interval?: integer;
            offset?: integer;
            position?: "nextTo" | "low" | "high" | "none";
        };
        tickMarks?: {
            interval?: integer;
            major?: ChartTickMark;
            minor?: ChartTickMark;
        };
        title?: ChartTitle;
    }
    Index

    Properties

    Which perpendicular axis this axis crosses, and where. When absent, it crosses the other axis of its plot, at the automatic position.

    { type: 'auto' }
    
    displayUnits?: number | "percent"

    Scales the tick labels. A number is the factor the values are divided by: with 1000, 25000 shows as 25. percent shows values as percentages, so 0.42 shows as 42%, as on a Pareto chart's cumulative axis. When absent, the labels aren't scaled.

    displayUnitsLabel?: ChartTitle

    Label for the display units. When absent, no label is shown. When present without text or formula, the text is the unit's name, such as "Thousands" for 1000, in the application's language. A factor that isn't a power of ten that the application names has no such text.

    gridlines?: { major?: Line; minor?: Line }

    Gridlines. A gridline is shown when its style is present, and an empty style ({}) draws it with the default: 0.75pt tx1 15%/85% for major gridlines, and 0.75pt tx1 5%/95% for minor gridlines.

    Type Declaration

    • Optionalmajor?: Line

      Major gridlines, at the major ticks.

    • Optionalminor?: Line

      Minor gridlines, at the minor ticks.

    hidden?: boolean

    Whether the axis is hidden. A hidden axis still positions the data.

    false
    
    id: string

    Identifies the axis within the chart. Another axis names it in its crosses to cross it.

    multiLevelLabels?: boolean

    For a category axis with multi-level categories, whether to show every level of labels. When false, only the innermost level is shown.

    true
    
    numberFormat?: string

    Excel number format code for the tick labels. When sourceLinked is true, the labels follow the source data's format instead, and this is only a fallback.

    "General"
    
    orient: "top" | "right" | "bottom" | "left" | "depth"

    Which side of the plot area the axis is on. A depth axis runs front to back in a 3D chart, and its placement follows from Chart.view3D.

    scale: string

    The scale that this axis draws, named by its id.

    shape?: Shape

    Style of the axis line. By default, a category axis has a 0.75pt tx1 15%/85% line, and other axes have none. A category axis is one for a band, point, or time scale, or the x axis of a point plot. A depth axis is never a category axis.

    sourceLinked?: boolean

    Whether the number format follows the source data.

    true
    
    textStyle?: ChartTextStyle

    Text style of the tick labels. The axis title and the display units label have their own. By default, the labels are 9pt tx1 65%/35% in the minor font. See ChartTextStyle.

    tickLabels?: {
        align?: "center" | "left" | "right";
        interval?: integer;
        offset?: integer;
        position?: "nextTo" | "low" | "high" | "none";
    }

    Where the tick labels go, and which are shown. Their number format and text style are set on the axis itself, with numberFormat and textStyle.

    Type Declaration

    • Optionalalign?: "center" | "left" | "right"

      For a category axis, how the labels align with their tick marks.

      "center"
      
    • Optionalinterval?: integer

      For a category axis, show every Nth label. When absent, the interval is automatic.

    • Optionaloffset?: integer

      For a category axis, the distance between the labels and the axis, as a percentage of the default distance (0-1000).

      100
      
    • Optionalposition?: "nextTo" | "low" | "high" | "none"

      Where the tick labels are placed.

      Value Placement
      nextTo Next to the axis.
      low At the low end of the perpendicular axis.
      high At the high end of the perpendicular axis.
      none Labels are hidden.
      "nextTo"
      
    tickMarks?: { interval?: integer; major?: ChartTickMark; minor?: ChartTickMark }

    Tick marks. Unlike gridlines, these are settings with defaults, so an absent or empty tickMarks means outside major tick marks and no minor ones. Tick marks are drawn in the style of the axis line.

    Type Declaration

    • Optionalinterval?: integer

      For a category axis, show a tick mark every Nth category.

      1
      
    • Optionalmajor?: ChartTickMark

      How the major tick marks are drawn.

      "outside"
      
    • Optionalminor?: ChartTickMark

      How the minor tick marks are drawn.

      "none"
      
    title?: ChartTitle

    The axis title. When absent, the axis has no title. When present without text or formula, the title text is automatic ("Axis Title").