From aa25962d8d19e450752d600ae5dde4df95006b26 Mon Sep 17 00:00:00 2001 From: Uyarn Date: Tue, 28 Dec 2021 16:31:48 +0800 Subject: [PATCH] fix(charts): rerender text color when change mode --- src/pages/dashboard/base/index.ts | 11 ++++++++--- src/pages/dashboard/base/index.vue | 14 +++++++------- src/pages/dashboard/detail/index.vue | 14 +++++++------- src/pages/detail/deploy/index.vue | 10 +++++----- src/pages/user/index.vue | 6 +++--- 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/pages/dashboard/base/index.ts b/src/pages/dashboard/base/index.ts index edbd4b2..315b133 100644 --- a/src/pages/dashboard/base/index.ts +++ b/src/pages/dashboard/base/index.ts @@ -149,19 +149,19 @@ export function constructInitDashboardDataset(type: string) { { value: 135, itemStyle: { - color: chartListColor()[1], + opacity: 0.2, }, }, { value: 118, itemStyle: { - color: chartListColor()[1], + opacity: 0.2, }, }, { value: 60, itemStyle: { - color: chartListColor()[1], + opacity: 0.2, }, }, ], @@ -1077,6 +1077,7 @@ export function getPieChartDataSet({ radius = 42, textColor, placeholderColor, + containerColor, }: { radius: number } & Record) { return { color: chartListColor(), @@ -1110,6 +1111,10 @@ export function getPieChartDataSet({ selectedMode: true, hoverAnimation: true, silent: true, + itemStyle: { + borderColor: containerColor, + borderWidth: 1, + }, label: { show: true, position: 'center', diff --git a/src/pages/dashboard/base/index.vue b/src/pages/dashboard/base/index.vue index 6ba8071..93a90de 100644 --- a/src/pages/dashboard/base/index.vue +++ b/src/pages/dashboard/base/index.vue @@ -203,7 +203,7 @@