SheetXL - v1.0.2
    Preparing search index...

    Interface ChartLayout

    A chart laid out: every rect, scale, tick, label string and bar width, in px from the chart's top-left, with every color concrete. A painter translates it and decides nothing.

    Plain data, never stored on the model: it is computed from the chart, its theme and a size.

    What it is drawn with is said in the shapes' own vocabulary, with these promises:

    • A fill is an IFill.JSON (solid, gradient, pattern or image) and null for none; a line an IStroke.JSON with its fill and width stated, and null for none; text the IText.RunPropertiesJSON of its run, with its font.family, size and color stated.
    • Every color is concrete: #RRGGBB, or rgba(r,g,b,a) when it is not opaque. Never a theme reference (accent1), a CSS variable or light-dark().
    • Every length is in px: a line's width and a run's size too, which the model states in points.
    • A line's dash is as IStroke.JSON states it, a preset or lengths; IStroke.toDashLengths reads either in line widths.
    interface ChartLayout {
        axes: AxisLayout[];
        chartArea: {
            border: IStroke.JSON | null;
            cornerRadius: number;
            fill: IFill.JSON | null | undefined;
        };
        groups: GroupLayout[];
        height: number;
        legend: LegendLayout
        | null;
        plotArea: {
            border: IStroke.JSON | null;
            fill: IFill.JSON | null;
            inner: Bounds;
            outer: Bounds;
        };
        title: TextLayout
        | null;
        width: number;
    }
    Index
    axes: AxisLayout[]

    One per axis of the chart, deleted ones included.

    chartArea: {
        border: IStroke.JSON | null;
        cornerRadius: number;
        fill: IFill.JSON | null | undefined;
    }

    Type Declaration

    • border: IStroke.JSON | null
    • cornerRadius: number

      The radius of the chart area's corners, measured along the border's path; 0 for square corners.

    • fill: IFill.JSON | null | undefined

      undefined where the chart states no fill: the chart area is the background of where it is drawn (Excel draws it in the theme's background color).

    groups: GroupLayout[]

    One per chart group, in the chart's order.

    height: number
    legend: LegendLayout | null
    plotArea: {
        border: IStroke.JSON | null;
        fill: IFill.JSON | null;
        inner: Bounds;
        outer: Bounds;
    }

    Type Declaration

    • border: IStroke.JSON | null
    • fill: IFill.JSON | null
    • inner: Bounds

      Where the axes cross and the series are drawn.

    • outer: Bounds

      The plot area with its axes' labels: what Excel calls the plot area's outer box.

    title: TextLayout | null
    width: number

    The chart in px, unzoomed.