MAIDR Documentation - v3.69.0
    Preparing search index...
    • Bind an AnyChart chart to MAIDR for accessible interaction.

      This is the primary high-level API. It extracts data from a drawn AnyChart chart, generates the MAIDR schema, injects it as a maidr-data attribute on the chart's container element, and dispatches a maidr:bindchart event so the MAIDR runtime picks it up.

      The MAIDR runtime (maidr.js) must be loaded on the page. It listens for maidr:bindchart events and initialises accessibility features for the target element.

      Calling this function multiple times on the same chart is safe: if the container has already been bound, the existing Maidr data is returned without re-dispatching the initialisation event.

      Parameters

      Returns Maidr | null

      The generated Maidr object, or null on failure.

      const chart = anychart.bar([4, 2, 7, 1]);
      chart.container('container').draw();
      bindAnyChart(chart);