Converts a rendered ECharts instance into MAIDR's accessible format for
audio sonification, text descriptions, braille output and keyboard
navigation.
Remarks
The adapter must be called after ECharts has drawn, because it locates
marks in the SVG -- register it on the chart's finished event, or call it
from a setTimeout after setOption.
Prefer the SVG renderer. ECharts defaults to canvas, which draws no
elements to point at: a canvas chart reads correctly, and its bars, points,
lines, areas, pie and sunburst slices are outlined through an overlay drawn
from the model, but any other series type is outlined only on SVG.
bindEChart keeps a chart read as its data and size change, and
bindAllECharts does that for every chart on a page -- the way into Apache
Superset and Metabase, which create their own charts (#1304).
The readings target echarts 6.1.0, measured in Chromium; the mark
detection in selectors.ts depends on how that version paints, so verify it
if you upgrade.
Apache ECharts adapter for MAIDR.
Converts a rendered ECharts instance into MAIDR's accessible format for audio sonification, text descriptions, braille output and keyboard navigation.
Remarks
The adapter must be called after ECharts has drawn, because it locates marks in the SVG -- register it on the chart's
finishedevent, or call it from asetTimeoutaftersetOption.Prefer the SVG renderer. ECharts defaults to canvas, which draws no elements to point at: a canvas chart reads correctly, and its bars, points, lines, areas, pie and sunburst slices are outlined through an overlay drawn from the model, but any other series type is outlined only on SVG.
bindEChartkeeps a chart read as its data and size change, andbindAllEChartsdoes that for every chart on a page -- the way into Apache Superset and Metabase, which create their own charts (#1304).The readings target echarts 6.1.0, measured in Chromium; the mark detection in
selectors.tsdepends on how that version paints, so verify it if you upgrade.Example