SheetXL - v0.8.0-beta.25
    Preparing search index...

    Interface ChartContext

    What an own kind is given: the chart's chrome as laid out, and the frame to finish the layout in.

    interface ChartContext {
        chart: ResolvedChart;
        height: number;
        labels: LabelsContext;
        legend: LegendLayout | null;
        outer: Box;
        text: TextContext;
        title: TextLayout | null;
        width: number;
        at(pt: number): number;
        frame(
            plot: {
                axes: AxisLayout[];
                groups: GroupLayout[];
                inner: Box;
                legend?: LegendLayout | null;
            },
        ): ChartLayout;
        label(axis: Axis, tick: number): string;
        px(pt: number): number;
    }
    Index
    chart: ResolvedChart
    height: number
    legend: LegendLayout | null
    outer: Box

    The plot area's outer rect, pt: what the chrome left for the plot.

    title: TextLayout | null
    width: number

    The frame's width and height, pt.

    • A frame coordinate as px from the chart's top-left, which the layout speaks.

      Parameters

      • pt: number

      Returns number

    • An axis's label for a tick value.

      Parameters

      • axis: Axis
      • tick: number

      Returns string

    • A length in pt as px.

      Parameters

      • pt: number

      Returns number