// 绘制echarts图表
import * as echarts from 'echarts'
import 'echarts-wordcloud';
const setChart = (option, chartId) => {
  let chartDom = document.getElementById(chartId);
  if (!chartDom) {
    return null;
  }
  chartDom.removeAttribute("_echarts_instance_");
  let chart = echarts.init(chartDom);
  chart.setOption(option);
  return chart;
};

export default setChart