// ECharts 按需导入工具，避免打包整个echarts库，提升构建体积
// 只注册需要的组件，确保三个页面的图表渲染正常
import * as echarts from 'echarts/core'
import { BarChart, LineChart, PieChart } from 'echarts/charts'
import { GridComponent, TooltipComponent, TitleComponent, LegendComponent } from 'echarts/components'
import { CanvasRenderer } from 'echarts/renderers'

// 注册所需的图表/组件/渲染器
echarts.use([BarChart, LineChart, PieChart, GridComponent, TooltipComponent, TitleComponent, LegendComponent, CanvasRenderer])

export default echarts
