MAIDR JavaScript API
    Preparing search index...

    Interface DescriptionState

    Description state containing objective chart metadata for the description modal. Fetched on-demand when the user opens the description dialog.

    interface DescriptionState {
        chartType: string;
        title: string;
        axes: { x?: string; y?: string; z?: string };
        stats: DescriptionStat[];
        dataTable: {
            headers: string[];
            columnAxes?: (AxisType | undefined)[];
            rows: (string | number | number[])[][];
        };
        subplots?: SubplotSummary[];
        layers?: LayerSummary[];
    }
    Index

    Properties

    chartType: string

    Chart/trace type label (e.g., "Bar Chart", "Line Plot")

    title: string

    Chart title

    axes: { x?: string; y?: string; z?: string }

    Axes information

    Chart-specific summary statistics

    dataTable: {
        headers: string[];
        columnAxes?: (AxisType | undefined)[];
        rows: (string | number | number[])[][];
    }

    Data table for raw data display.

    A cell holds a number[] when one row carries several numbers for a column — a box plot's outliers are the only case today. Traces hand those over unjoined so DescriptionService can round each one before joining them for display; a pre-joined string would arrive as opaque text. The array form is numeric on purpose: a column of several strings has no caller, and widening it would mean rounding logic for a shape nothing produces.

    Type Declaration

    • headers: string[]
    • OptionalcolumnAxes?: (AxisType | undefined)[]

      Which axis each column's values were measured on, index-aligned with headers, so the dialog can read a column the way the chart's author asked for it to be read.

      A layer may declare a format per axis -- currency, a percentage, a date -- and the announcements honour it, so navigating a candlestick says "Nov 3" and "$180.25". The table had no way to know which column was which axis and printed the raw numbers, so one dialog described one value two ways.

      undefined for a column that sits on no axis: a category name, a quantile label, a computed share, a count the layer never declared a format for. Omitting the whole array is the same as every column being undefined, which is what a trace that has not been taught this does -- its table keeps the description's own rounding, exactly as before.

    • rows: (string | number | number[])[][]
    subplots?: SubplotSummary[]

    List of all subplots in the figure, populated only when the figure has more than one subplot. Lets users see what other subplots are available without having to navigate through them.

    layers?: LayerSummary[]

    Every layer of the subplot this description was taken from, populated only when the subplot has more than one. The dialog renders these as tabs, so a reader is told how many layers there are and which one they are on, and can switch to another without leaving the description.