import type { App } from 'vue'
import ECharts from 'vue-echarts'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { PieChart, ScatterChart, BarChart, RadarChart, LineChart } from 'echarts/charts'
import { TitleComponent, TooltipComponent, LegendComponent, ToolboxComponent } from 'echarts/components'
use([
	CanvasRenderer,
	PieChart,
	BarChart,
	ScatterChart,
	RadarChart,
	TitleComponent,
	TooltipComponent,
	LegendComponent,
	ToolboxComponent,
	LineChart,
])

export default {
	install: (app: App) => {
		app.component('VChart', ECharts)
	},
}
