From 158aa5fc1b4183febdab14b68f5a07fab5724817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=9F=E5=BD=A6=E7=A5=96?= Date: Wed, 7 Aug 2024 16:25:38 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BD=BF=E7=94=A8useEcharts?= =?UTF-8?q?=E9=87=8D=E6=9E=84=E7=BC=93=E5=AD=98=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monitor/cache/components/CommandChart.vue | 30 ++++++++----------- .../monitor/cache/components/MemoryChart.vue | 24 +++++++-------- .../effects/chart-ui/src/echarts/echarts.ts | 9 +++++- 3 files changed, 31 insertions(+), 32 deletions(-) diff --git a/apps/web-antd/src/views/monitor/cache/components/CommandChart.vue b/apps/web-antd/src/views/monitor/cache/components/CommandChart.vue index 219799c3..70837494 100644 --- a/apps/web-antd/src/views/monitor/cache/components/CommandChart.vue +++ b/apps/web-antd/src/views/monitor/cache/components/CommandChart.vue @@ -1,13 +1,13 @@ diff --git a/apps/web-antd/src/views/monitor/cache/components/MemoryChart.vue b/apps/web-antd/src/views/monitor/cache/components/MemoryChart.vue index c6a47bb1..7e952087 100644 --- a/apps/web-antd/src/views/monitor/cache/components/MemoryChart.vue +++ b/apps/web-antd/src/views/monitor/cache/components/MemoryChart.vue @@ -1,13 +1,13 @@ diff --git a/packages/effects/chart-ui/src/echarts/echarts.ts b/packages/effects/chart-ui/src/echarts/echarts.ts index 85323a42..294f29e2 100644 --- a/packages/effects/chart-ui/src/echarts/echarts.ts +++ b/packages/effects/chart-ui/src/echarts/echarts.ts @@ -12,7 +12,13 @@ import type { } from 'echarts/components'; import type { ComposeOption } from 'echarts/core'; -import { BarChart, LineChart, PieChart, RadarChart } from 'echarts/charts'; +import { + BarChart, + GaugeChart, + LineChart, + PieChart, + RadarChart, +} from 'echarts/charts'; import { // 数据集组件 DatasetComponent, @@ -54,6 +60,7 @@ echarts.use([ CanvasRenderer, LegendComponent, ToolboxComponent, + GaugeChart, ]); export default echarts;