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

    Interface ChartDataModel

    A chart part, xl/charts/chart{n}.xml: its type, series, axes, legend and options.

    interface ChartDataModel {
        autoTitleDeleted?: boolean | null;
        barDirHorizontal?: boolean | null;
        catAxis?: ChartAxisData | null;
        chartType: ChartType;
        dataLabels?: DataLabelsData | null;
        grouping?: ChartGrouping | null;
        holeSize?: number | null;
        legend?: ChartLegendData | null;
        plotAreaLayout?: ManualLayoutData | null;
        radarStyle?: RadarStyle | null;
        rawRels?: string | null;
        rawXml?: string | null;
        scatterStyle?: ScatterStyle | null;
        secondaryCatAxis?: ChartAxisData | null;
        secondaryChart?: ChartDataModel | null;
        secondaryValAxis?: ChartAxisData | null;
        series: ChartSeriesData[];
        showDataTable?: boolean;
        styleId?: number | null;
        title?: ChartTitleData | null;
        valAxis?: ChartAxisData | null;
        view3d?: View3DData | null;
    }
    Index
    autoTitleDeleted?: boolean | null

    c:autoTitleDeleted. When unset the writer emits 1 for a chart without a title and 0 for a chart with one, so Excel adds no automatic title.

    barDirHorizontal?: boolean | null

    true writes a 'column' chart with horizontal bars (c:barDir bar); a 'bar' chart is always horizontal.

    catAxis?: ChartAxisData | null
    chartType: ChartType
    dataLabels?: DataLabelsData | null
    grouping?: ChartGrouping | null
    holeSize?: number | null

    c:holeSize of a doughnut chart (ignored for other types), 1 to 90 (checked by validateChartData).

    legend?: ChartLegendData | null
    plotAreaLayout?: ManualLayoutData | null

    Manual layout of the plot area.

    radarStyle?: RadarStyle | null
    rawRels?: string | null

    The chart part's .rels as read, for every chart that has one, modelled or kept in rawXml. It is written beside the chart at whatever path the chart gets, so the parts it references (styles, colours, user shapes, embedded data) stay linked to their own chart.

    rawXml?: string | null

    The chart part exactly as read, kept when the file holds what the model cannot represent (a 3-D, surface or bar/pie-of-pie chart type, a third chart-type element, an axis the model has no slot for, or a c:userShapes or c:externalData reference). While it is set the model is ignored on write and the bytes are written unchanged; delete rawXml to write the chart from the model instead, and with it the rawRels relationships only these bytes referenced.

    scatterStyle?: ScatterStyle | null
    secondaryCatAxis?: ChartAxisData | null

    Secondary category axis of a combo chart, written as a second c:catAx.

    secondaryChart?: ChartDataModel | null

    Secondary chart of a combo chart: one chart-type element written after the primary one, on secondaryCatAxis and secondaryValAxis. An unset slot shares the primary chart's axis in that slot (catAxis / valAxis; for a scatter or bubble primary read from a file, valAxis / secondaryValAxis), else a default axis the writer adds, also under a pie or doughnut primary, which stays axis-free. Its own axis fields are not written. It cannot nest: a secondaryChart with a secondaryChart of its own makes the write throw (XML_WRITE). Its series share one order numbering with the primary chart's (see ChartSeriesData.order); ChartBuilder.secondaryChart continues it.

    secondaryValAxis?: ChartAxisData | null

    Secondary value axis of a combo chart.

    series: ChartSeriesData[]
    showDataTable?: boolean

    true writes a data table (c:dTable, with legend keys) in the plot area.

    styleId?: number | null

    c:style, 1 to 48 (checked by validateChartData).

    title?: ChartTitleData | null
    valAxis?: ChartAxisData | null
    view3d?: View3DData | null