Provides adapter functions that convert amCharts 5 chart instances into
MAIDR-compatible data objects. The resulting data can be passed to the
<Maidr> React component or embedded as a maidr-data HTML attribute,
enabling audio sonification, text descriptions, braille output, and
keyboard navigation for amCharts 5 visualizations.
Remarks
amCharts 5 is a commercial charting library and is not bundled with
MAIDR. Consumers must install amCharts 5 separately. amCharts 4 has a
significantly different API and is not supported.
Two ways to use it:
bindAmCharts (recommended) — mounts the MAIDR UI over the chart
AND draws a canvas highlight overlay on the active data point. Required
for visual highlighting, because amCharts renders to canvas.
fromAmCharts — returns plain MAIDR JSON for the maidr HTML
attribute or <Maidr data={...}>. Enables audio/text/braille but NOT
visual highlighting (the highlight callback cannot survive JSON).
Example
import { bindAmCharts } from'maidr/amcharts';
constroot = am5.Root.new('chartdiv'); // ... add axes, series, data ... constbinding = bindAmCharts(root, { title:'Sales by Day' }); // later, to clean up: binding.dispose();
amCharts 5 binder for MAIDR.
Provides adapter functions that convert amCharts 5 chart instances into MAIDR-compatible data objects. The resulting data can be passed to the
<Maidr>React component or embedded as amaidr-dataHTML attribute, enabling audio sonification, text descriptions, braille output, and keyboard navigation for amCharts 5 visualizations.Remarks
amCharts 5 is a commercial charting library and is not bundled with MAIDR. Consumers must install amCharts 5 separately. amCharts 4 has a significantly different API and is not supported.
Two ways to use it:
maidrHTML attribute or<Maidr data={...}>. Enables audio/text/braille but NOT visual highlighting (the highlight callback cannot survive JSON).Example