From 2dd55ce5167d3c4ef21022a6852fe3093b3c2fcd Mon Sep 17 00:00:00 2001 From: JenniferW <1627055433@qq.com> Date: Tue, 9 Sep 2025 10:24:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BB=93=E5=BA=93=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/component/DataWarehouse.vue | 54 +++++++++++++-------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/src/views/component/DataWarehouse.vue b/src/views/component/DataWarehouse.vue index f2719975..4366e4d3 100644 --- a/src/views/component/DataWarehouse.vue +++ b/src/views/component/DataWarehouse.vue @@ -24,15 +24,15 @@
全量同步累积次数 - 1,284 + 1284
API类数据源同步次数 - 3,721 + 3721
增量同步累积次数 - 8,547 + 8547
视图类数据源同步次数 @@ -82,14 +82,14 @@ export default { const xData = top20Apis.map((item) => item.abbr); const yData = top20Apis.map((item) => item.count); - // 配置项 - 修复悬停提示显示问题 + // 配置项 - 优化样式 const option = { - // backgroundColor: "#061326", + // 移除背景色设置,继承父容器背景 grid: { top: "15%", - left: "-5%", - bottom: "10%", - right: "5%", + left: "0%", + bottom: "5%", // 增加底部距离,让缩写名称离图表更远 + right: "0%", containLabel: true, }, tooltip: { @@ -102,10 +102,6 @@ export default { fontSize: 13, }, formatter: function (params) { - // 根据您提供的打印信息,params是单个对象而不是数组 - // 增加调试信息,帮助确认参数结构 - console.log("Tooltip params:", params); - // 检查参数是否有效 if ( !params || @@ -154,7 +150,7 @@ export default { fontSize: 13, fontWeight: "bold", }, - margin: 15, + margin: 25, // 增加与图表的距离 rotate: 0, }, }, @@ -195,7 +191,7 @@ export default { color: "#34DCFF", }, }, - color: "#2DB1EF", + color: "#36BFFA", // 优化上部椭圆颜色 data: yData, }, { @@ -204,7 +200,7 @@ export default { symbolSize: [40, 10], symbolOffset: [0, 7], z: 12, - color: "#2DB1EF", + color: "#36BFFA", // 优化下部椭圆颜色 data: yData, }, { @@ -218,7 +214,7 @@ export default { itemStyle: { normal: { color: "transparent", - borderColor: "#2EA9E5", + borderColor: "#36BFFA", // 优化内环颜色 borderType: "solid", borderWidth: 1, }, @@ -234,7 +230,7 @@ export default { itemStyle: { normal: { color: "transparent", - borderColor: "#19465D", + borderColor: "#1990CC", // 优化外环颜色 borderType: "solid", borderWidth: 2, }, @@ -251,14 +247,14 @@ export default { color: new echarts.graphic.LinearGradient(0, 0, 0, 0.7, [ { offset: 0, - color: "#38B2E6", + color: "#36BFFA", // 优化柱状图顶部颜色 }, { offset: 1, - color: "#0B3147", + color: "#0A4C6D", // 优化柱状图底部颜色 }, ]), - opacity: 0.8, + opacity: 0.9, // 稍微提高不透明度 }, }, data: yData, @@ -273,7 +269,7 @@ export default { // 挂载时初始化图表 onMounted(() => { if (dwdChartRef.value) { - dwdChartRef.value.style.height = "calc(100% - 20px)"; + dwdChartRef.value.style.height = "calc(100% - 20px)"; // 适当减小高度 initChart(); const handleResize = () => { @@ -306,7 +302,6 @@ export default {