import { ref, nextTick } from 'vue'
import * as echarts from 'echarts'
export default function useEchar(option: object, name: string) {

  const myCharts = ref<any>()

  nextTick(() => {
    const chartDom = document.getElementById(name)!
    myCharts.value = echarts.init(chartDom)
    myCharts.value.setOption(option)
  })
}

