MAIDR Documentation - v3.65.0
    Preparing search index...

    Interface GoogleChartLayoutInterface

    Chart layout interface for accessing element positions.

    interface GoogleChartLayoutInterface {
        getBoundingBox: (id: string) => GoogleBoundingBox | null;
        getXLocation: (dataValue: number, axisIndex?: number) => number;
        getYLocation: (dataValue: number, axisIndex?: number) => number;
    }
    Index

    Properties

    getBoundingBox: (id: string) => GoogleBoundingBox | null

    Returns the bounding box of a chart element.

    For bar/column charts, use IDs like:

    • 'bar#seriesIndex#dataIndex' — e.g., 'bar#0#2' for series 0, bar 2
    • 'chartarea' — the entire chart area
    • 'hAxis', 'vAxis' — axis elements

    Type Declaration

      • (id: string): GoogleBoundingBox | null
      • Parameters

        • id: string

          The element ID string

        Returns GoogleBoundingBox | null

        Bounding box with left, top, width, height, or null if not found

    getXLocation: (dataValue: number, axisIndex?: number) => number

    Returns the pixel x-coordinate of a data value relative to the chart container's left edge.

    Type Declaration

      • (dataValue: number, axisIndex?: number): number
      • Parameters

        • dataValue: number

          The data value on the horizontal axis

        • OptionalaxisIndex: number

          Optional axis index for charts with multiple axes (default: 0)

        Returns number

        The pixel x-coordinate

    getYLocation: (dataValue: number, axisIndex?: number) => number

    Returns the pixel y-coordinate of a data value relative to the chart container's top edge.

    Type Declaration

      • (dataValue: number, axisIndex?: number): number
      • Parameters

        • dataValue: number

          The data value on the vertical axis

        • OptionalaxisIndex: number

          Optional axis index for charts with multiple axes (default: 0)

        Returns number

        The pixel y-coordinate