Open ColaYuan opened 11 months ago
When using echarts-gl, (in nextjs), need to import dymamicly.
I use a single file with a chart-utility-component and imports this file dynamicly at runtime.
Inside this file, imports of echarts-gl are as the docs says.
import * as echarts from 'echarts';
import 'echarts-gl';
...
export default function Echart({mergeOptions, options, width, hegiht, onInit}) {
// here initialize the charts and handle all update chart logic
}
const Echart = dynamic(() => import('@/components/plots/Echart'), {
loading: () => <Loading />,
ssr: false,
});
...
<Echart ... />
This is in react, not vue but maybe vue has a similar capability