From 598d1cf91acd6d0c2782ae896b6eb78044eaf3e6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 30 十二月 2021 21:10:14 +0800
Subject: [PATCH] 2021-12-30

---
 src/menu/components/chart/antv-bar/index.jsx |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx
index 57ab6f4..56af912 100644
--- a/src/menu/components/chart/antv-bar/index.jsx
+++ b/src/menu/components/chart/antv-bar/index.jsx
@@ -476,6 +476,7 @@
       item.name = transfield[item.type] || item.type
       item.chartType = item.shape ? (item.shape[0] || 'bar') : 'bar'
       item.shape = item.shape ? (item.shape[1] || '') : ''
+      item.show = item.show || plot.show
 
       if (colors.has(item.name)) {
         item.color = colors.get(item.name)
@@ -815,7 +816,7 @@
           .color(item.color)
           .shape(item.shape)
           .tooltip(`${item.name}`, (value) => {
-            if (plot.show === 'percent') {
+            if (item.show === 'percent') {
               value = value + '%'
             }
             return {
@@ -829,7 +830,7 @@
         }
         if (item.label !== 'false') {
           _chart.label(item.name, (value) => {
-            if (plot.show === 'percent') {
+            if (item.show === 'percent') {
               value = value + '%'
             }
 
@@ -861,7 +862,7 @@
           .color(item.color)
           .shape(item.shape)
           .tooltip(`${item.name}`, (value) => {
-            if (plot.show === 'percent') {
+            if (item.show === 'percent') {
               value = value + '%'
             }
             return {
@@ -872,7 +873,7 @@
 
         if (item.label !== 'false') {
           _chart.label(item.name, (value) => {
-            if (plot.show === 'percent') {
+            if (item.show === 'percent') {
               value = value + '%'
             }
             let _color = color

--
Gitblit v1.8.0