From 2eb0cacc6838f36d7d817b3a9015a4ad64aab462 Mon Sep 17 00:00:00 2001 From: Fine Date: Mon, 24 Oct 2022 20:27:46 +0800 Subject: [PATCH] update chart --- src/views/dashboard/graphs/Bar.vue | 18 ++++++++++-------- src/views/dashboard/graphs/Line.vue | 5 ++++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/views/dashboard/graphs/Bar.vue b/src/views/dashboard/graphs/Bar.vue index ca877d39..b236d284 100644 --- a/src/views/dashboard/graphs/Bar.vue +++ b/src/views/dashboard/graphs/Bar.vue @@ -105,16 +105,12 @@ function getOption() { return { color, tooltip: { - trigger: "axis", - zlevel: 1000, - z: 60, - confine: true, - textStyle: { - fontSize: 13, + trigger: "none", + axisPointer: { + type: "cross", color: "#333", + backgroundColor: "rgba(255, 255, 255, 0.8)", }, - enterable: true, - extraCssText: "max-height: 300px; overflow: auto; border: none", }, legend: { type: "scroll", @@ -134,6 +130,12 @@ function getOption() { bottom: 5, containLabel: true, }, + axisPointer: { + label: { + color: "#333", + backgroundColor: "rgba(255, 255, 255, 0.8)", + }, + }, xAxis: { type: "category", axisTick: { diff --git a/src/views/dashboard/graphs/Line.vue b/src/views/dashboard/graphs/Line.vue index dfc8ac6b..d1c3d82a 100644 --- a/src/views/dashboard/graphs/Line.vue +++ b/src/views/dashboard/graphs/Line.vue @@ -121,6 +121,8 @@ function getOption() { trigger: "none", axisPointer: { type: "cross", + color: "#333", + backgroundColor: "rgba(255, 255, 255, 0.8)", }, // trigger: "axis", // textStyle: { @@ -160,7 +162,8 @@ function getOption() { }, axisPointer: { label: { - backgroundColor: "#777", + color: "#333", + backgroundColor: "rgba(255, 255, 255, 0.8)", }, }, grid: {