MAIDR JavaScript API
    Preparing search index...

    Interface AnyChartInstance

    The minimal chart interface the adapter requires.

    All supported AnyChart chart types (Cartesian, Pie, etc.) expose these methods once the chart has been drawn.

    interface AnyChartInstance {
        title: () => string | AnyChartTitle;
        container: () => string | HTMLElement | AnyChartStage;
        getSeriesCount: () => number;
        getSeriesAt: (index: number) => AnyChartSeries | null;
        xAxis?: (index?: number) => AnyChartAxis | null;
        yAxis?: (index?: number) => AnyChartAxis | null;
        yScale?: () => AnyChartScale | null;
        xScale?: () => AnyChartScale | null;
        getType?: () => string;
        labelsMode?: () => unknown;
        dataMode?: () => string;
        drawTotalsAsAbsolute?: () => boolean;
        data?: () => AnyChartDataView | AnyChartTree;
        geoData?: () => unknown;
        geoIdField?: () => string | undefined;
        toSvg?: () => string;
    }
    Index

    Properties

    title: () => string | AnyChartTitle

    Chart title accessor.

    container: () => string | HTMLElement | AnyChartStage

    Rendering container / stage.

    getSeriesCount: () => number

    Number of series in the chart.

    getSeriesAt: (index: number) => AnyChartSeries | null

    Get a series by its numeric index.

    xAxis?: (index?: number) => AnyChartAxis | null

    X-axis accessor (Cartesian charts). Returns null for non-Cartesian.

    yAxis?: (index?: number) => AnyChartAxis | null

    Y-axis accessor (Cartesian charts). Returns null for non-Cartesian.

    yScale?: () => AnyChartScale | null

    Y-scale accessor (Cartesian charts). Carries the chart's stacking mode, which is what tells an area series apart from a stacked one — see AnyChartScale. Absent on chart types with no Cartesian scales.

    xScale?: () => AnyChartScale | null

    X-scale accessor (Cartesian charts). Only its AnyChartScale.getType is read, to tell a dot plot's named categories from a scatter's measured ones. Absent on chart types with no Cartesian scales.

    getType?: () => string

    Chart type string (e.g. "bar", "line", "pie").

    labelsMode?: () => unknown

    Circle packing's own label placement, and the one public method that separates it from the other two hierarchy charts: a treemap and a sunburst have neither it nor anything else readable of their own, and a circle packing reports no getType() at all (#1170).

    dataMode?: () => string

    How a waterfall chart reads its series values ('diff' by default, or 'absolute'). In diff mode a row's value IS the step's contribution; in absolute mode it is the running total the step arrives at. Present only on a waterfall chart.

    drawTotalsAsAbsolute?: () => boolean

    Whether a waterfall draws a step marked isTotal at its own value rather than at the running total it arrived at. Off by default, and present only on a waterfall chart.

    Chart-level data accessor. Present on single-dataset chart types such as Heatmap, which do not expose a series-based API and instead store their cells in a top-level data view. Absent on multi-series Cartesian charts (bar, line, scatter, box, candlestick).

    A gantt chart answers with an AnyChartTree instead of a data view — the two are told apart by whether the result can hand out an iterator, never by the chart type alone.

    geoData?: () => unknown

    The geodata a map was bound to (anychart.maps.*), as GeoJSON or TopoJSON. Read for one thing only: the region names, which the data rows do not carry. Present on a map chart.

    geoIdField?: () => string | undefined

    Which property of a geo feature the data rows' id is matched against. Defaults to 'id'. Present on a map chart.

    toSvg?: () => string

    SVG string export.