2022-04-08 02:42:44 +00:00
|
|
|
import ECharts from 'vue-echarts'
|
|
|
|
|
import { use } from 'echarts/core'
|
|
|
|
|
import { App } from '@vue/runtime-core'
|
|
|
|
|
|
|
|
|
|
// 手动引入 ECharts 各模块来减小打包体积
|
|
|
|
|
import { CanvasRenderer } from 'echarts/renderers'
|
2022-04-15 03:02:49 +00:00
|
|
|
import {
|
|
|
|
|
BarChart,
|
|
|
|
|
PieChart,
|
|
|
|
|
LineChart,
|
|
|
|
|
PieSeriesOption,
|
|
|
|
|
GaugeChart,
|
|
|
|
|
GaugeSeriesOption
|
|
|
|
|
} from 'echarts/charts'
|
2022-04-14 08:22:13 +00:00
|
|
|
import { LabelLayout } from 'echarts/features'
|
2022-04-08 02:42:44 +00:00
|
|
|
import {
|
|
|
|
|
GridComponent,
|
|
|
|
|
TooltipComponent,
|
|
|
|
|
TitleComponent,
|
2022-04-14 08:22:13 +00:00
|
|
|
LegendComponent,
|
|
|
|
|
TitleComponentOption,
|
|
|
|
|
TooltipComponentOption,
|
|
|
|
|
LegendComponentOption
|
2022-04-08 02:42:44 +00:00
|
|
|
} from 'echarts/components'
|
|
|
|
|
|
|
|
|
|
use([
|
|
|
|
|
CanvasRenderer,
|
|
|
|
|
BarChart,
|
|
|
|
|
PieChart,
|
|
|
|
|
GridComponent,
|
|
|
|
|
TooltipComponent,
|
|
|
|
|
TitleComponent,
|
|
|
|
|
LegendComponent,
|
2022-04-14 08:22:13 +00:00
|
|
|
LineChart,
|
2022-04-15 03:02:49 +00:00
|
|
|
LabelLayout,
|
|
|
|
|
GaugeChart
|
2022-04-08 02:42:44 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
export default (app: App) => {
|
|
|
|
|
app.component('VChart', ECharts)
|
|
|
|
|
}
|