import Vue from "vue";
import * as echarts from "echarts/core";
import ECharts from "vue-echarts";
// 手动引入 ECharts 各模块来减小打包体积
import {
  GraphicComponent,
  TooltipComponent,
  LegendComponent
} from "echarts/components";
import { PieChart } from "echarts/charts";
import { CanvasRenderer } from "echarts/renderers";

echarts.use([
  TooltipComponent,
  LegendComponent,
  PieChart,
  CanvasRenderer,
  GraphicComponent
]);

// 全局注册组件（也可以使用局部注册）
Vue.component("v-chart", ECharts);
