Migrate from ECharts
fromECharts reads series, xAxis, yAxis, title, legend, and tooltip. areaStyle becomes an area. A radius array becomes a donut. markLine and markArea become rule and band annotations. smooth becomes curve: monotone.
The spec then runs validate() and repair(). Unmapped keys come back as warnings. @chartkitdev/convert is unpublished and is not in the ChartKit bundles.
import { fromECharts } from "@chartkitdev/convert";
const { spec, warnings } = fromECharts(option);Mapped
- line
- area (areaStyle)
- bar
- bar grouped
- bar stacked
- stack groups, including a stack beside an unstacked series
- pie
- donut (radius array)
- scatter
- bubble (symbolSize or a third data value)
- combo (mixed series types)
- title, legend, tooltip
- xAxis.name, yAxis.name, min, max
- markLine and markArea
- smooth
Warned, not mapped
- heatmap, gauge, candlestick, radar, graph, and map series
- dataset.encode beyond a category axis plus series.data
- visualMap, dataZoom, and toolbox
- symbolSize functions
A stack name is a stack group. Series that share it stack. A series without one stays unstacked, including a line beside a stacked area. Heatmap, gauge, candlestick, radar, graph, map, visualMap, dataZoom, toolbox, and symbolSize functions warn.
Try this source in the converter. Getting started renders one spec next to the charts you already have.