Easily reuse your echarts charts in vue3.
npm install vue-use-charts
import { ref } from 'vue'
import { useCharts } from 'vue-use-charts'
import { ChartDemo } from './charts/demo'
const { createChartComp } = useCharts()
const MyChart = createChartComp(ChartDemo)
const data = ref({
// ...
})
const echartsOpts = {
// ...
}
<template>
<MyChart :data="data" :opts="echartsOpts" class="my-chart"/>
</template>
MIT