Converts a rendered ApexCharts chart into a MAIDR data structure.
Call it once the chart has finished drawing — after render() resolves
and its entry animation has ended, or with animations disabled — because
the selectors are generated against the drawn SVG and the box plot and
candlestick parts are cut from it. bindApexCharts does that
waiting for you.
A combo chart (series[i].type differing) becomes one subplot holding a
layer per group of series. Series of any other type (rangeArea, for one)
are skipped with a console warning, as are series hidden through the
legend.
On a box plot or candlestick chart the conversion changes the chart's DOM:
it adds a hidden path per part next to each box or candle, and keeps them
in step with the originals. bindApexCharts removes them when it is
disposed; a page that converts a chart itself calls removeSplitParts
with the chart's container once it no longer needs the data.
Converts a rendered ApexCharts chart into a MAIDR data structure.
Call it once the chart has finished drawing — after
render()resolves and its entry animation has ended, or with animations disabled — because the selectors are generated against the drawn SVG and the box plot and candlestick parts are cut from it. bindApexCharts does that waiting for you.Supported ApexCharts types:
line→ TraceType.LINE, or TraceType.STEP for thestepline(hv) andlinestep(vh) curvesarea→ TraceType.AREA; stacked → TraceType.STACKED_AREA;stackType: '100%'→ TraceType.NORMALIZED_AREA, with a console warning, since ApexCharts 7.6.0 draws that chart outside its plot areabar/column→ TraceType.BAR; several series → TraceType.DODGED, stacked → TraceType.STACKED,stackType: '100%'→ TraceType.NORMALIZED, one stacked layer perseries[i].groupwhen there are several; horizontal bars are Orientation.HORIZONTALbarwithplotOptions.bar.isFunnel→ TraceType.FUNNELscatterandbubble→ TraceType.SCATTER, one layer per seriespie/donut→ TraceType.PIEpolarArea→ TraceType.POLAR_AREAheatmap→ TraceType.HEATMAPcandlestick→ TraceType.CANDLESTICK, one layer per seriesboxPlot→ TraceType.BOX, one layer per series; ascatterseries drawn over it becomes the boxes' outliersradar→ TraceType.RADARrangeBar→ TraceType.GANTTtreemap→ TraceType.TREEMAPradialBar→ TraceType.GAUGE, one layer per ringA combo chart (
series[i].typediffering) becomes one subplot holding a layer per group of series. Series of any other type (rangeArea, for one) are skipped with a console warning, as are series hidden through the legend.On a box plot or candlestick chart the conversion changes the chart's DOM: it adds a hidden path per part next to each box or candle, and keeps them in step with the originals. bindApexCharts removes them when it is disposed; a page that converts a chart itself calls
removeSplitPartswith the chart's container once it no longer needs the data.