modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Interface AddSeriesOptions

    Options for adding a data series to a chart via ChartBuilder.addSeries.

    interface AddSeriesOptions {
        bubbleSizeRef?: string;
        catRef?: string;
        dataLabels?: Partial<DataLabelsData>;
        errorBars?: {
            direction?: ErrorBarDirection;
            errType: ErrorBarType;
            value?: number;
        };
        explosion?: number;
        fillColor?: string;
        idx?: number;
        lineColor?: string;
        lineWidth?: number;
        marker?: MarkerStyleType;
        name?: string;
        nameLiteral?: string;
        order?: number;
        smooth?: boolean;
        trendline?: {
            backward?: number;
            displayEq?: boolean;
            displayRSqr?: boolean;
            forward?: number;
            order?: number;
            period?: number;
            trendType: TrendlineType;
        };
        valRef: string;
        xValRef?: string;
    }
    Index
    bubbleSizeRef?: string

    Bubble size reference for bubble charts.

    catRef?: string

    Category axis data reference (e.g., 'Sheet1!$A$2:$A$5').

    dataLabels?: Partial<DataLabelsData>

    Per-series data label configuration.

    errorBars?: {
        direction?: ErrorBarDirection;
        errType: ErrorBarType;
        value?: number;
    }

    Error bars configuration for this series.

    explosion?: number

    Pie/doughnut slice explosion as a percentage of the radius (non-negative integer; xsd:unsignedInt, no spec maximum).

    fillColor?: string

    Fill color as hex RGB (e.g., '4472C4').

    idx?: number

    c:idx. Omitted, ChartBuilder.build gives the series the next value from 0 up that no series of this chart or its ChartBuilder.secondaryChart uses.

    lineColor?: string

    Line/border color as hex RGB.

    lineWidth?: number

    Line width in points (finite, 0-1584); stored as EMU (12700 per point). Written only with lineColor.

    Marker symbol style (e.g., 'circle', 'square').

    name?: string

    Series name as a cell-reference formula (e.g., 'Sheet1!$B$1'), written as c:tx/c:strRef/c:f. It is not display text: pass literal display names as AddSeriesOptions.nameLiteral. Written in preference to nameLiteral.

    nameLiteral?: string

    Series name as literal text (e.g., 'Revenue'), written as c:tx/c:v when name is unset.

    order?: number

    c:order, which must be unique across this chart and its ChartBuilder.secondaryChart (Excel refuses a file where two series share it). Omitted, it is numbered like idx.

    smooth?: boolean

    Enable smooth line rendering for line/scatter charts.

    trendline?: {
        backward?: number;
        displayEq?: boolean;
        displayRSqr?: boolean;
        forward?: number;
        order?: number;
        period?: number;
        trendType: TrendlineType;
    }

    Trendline configuration for this series. order (polynomial trendlines) is an integer 2-6 and period (moving-average trendlines) an integer of at least 2; both are validated.

    valRef: string

    Value axis data reference (e.g., 'Sheet1!$B$2:$B$5'). Required.

    xValRef?: string

    X-value reference for scatter/bubble charts.