MAIDR JavaScript API
    Preparing search index...

    Minimal interface for an amCharts 5 visual sprite / graphic.

    In amCharts 5, geometry accessors (x(), y(), width(), height()) are methods returning pixels in the sprite's local coordinate space, and toGlobal() maps a local point to root-container coordinates. They are optional here because not every sprite exposes laid-out geometry.

    interface AmSprite {
        dom?: SVGElement;
        uid?: number;
        x?: () => number;
        y?: () => number;
        width?: () => number;
        height?: () => number;
        toGlobal?: (point: AmPoint) => AmPoint;
        globalBounds?: () => AmBounds;
        get?: (key: string) => unknown;
    }
    Index

    Properties

    dom?: SVGElement
    uid?: number
    x?: () => number
    y?: () => number
    width?: () => number
    height?: () => number
    toGlobal?: (point: AmPoint) => AmPoint
    globalBounds?: () => AmBounds

    Global bounding box in CSS px.

    Reliable for a sprite drawn from primitives. A Slice is not one: it paints through a draw callback, so nothing feeds the bounds accumulator and it reports a degenerate box at its own centre. Read a wedge's extent from its settings instead — see wedgeBounds.

    get?: (key: string) => unknown

    Settings accessor; a Slice carries radius / startAngle / arc here.