From cdd5b449130ea4d7223fde4f414a11a7d0c33d6d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 07 三月 2024 17:52:16 +0800
Subject: [PATCH] 2024-03-07

---
 src/tabviews/custom/components/chart/antv-bar-line/index.jsx |   47 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
index f86a91e..75a01b7 100644
--- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -256,15 +256,35 @@
       style: { fill: _config.plot.color }
     }}
     let yc = {label: { style: { fill: _config.plot.color } }}
+
     if (_config.plot.grid === 'hidden') {
       yc.grid = null
     }
-    if (_config.plot.y_line === 'show') {
+    if (_config.plot.tick === 'hidden') {
+      xc.tickLine = null
+    }
+    if (_config.plot.x_line === 'hidden') {
+      xc.line = null
+    }
+    if (_config.plot.y_line === 'hidden') {
+      yc.line = null
+    } else {
       yc.line = {style: { stroke: '#D1D2CE' }}
     }
+    if (_config.plot.x_label === 'hidden') {
+      xc.label = null
+    }
+    if (_config.plot.y_label === 'hidden') {
+      yc.label = null
+    }
+
     if (_config.plot.lineColor) {
-      xc.tickLine = {style: { stroke: _config.plot.lineColor }}
-      xc.line = { style: { stroke: _config.plot.lineColor } }
+      if (xc.tickLine !== null) {
+        xc.tickLine = {style: { stroke: _config.plot.lineColor }}
+      }
+      if (xc.line !== null) {
+        xc.line = { style: { stroke: _config.plot.lineColor } }
+      }
       if (yc.grid !== null) {
         yc.grid = { line: { style: { stroke: _config.plot.lineColor } }}
       }
@@ -929,6 +949,9 @@
           val = val + ''
           val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
         }
+        if (plot.labelUnit) {
+          val = val + plot.labelUnit
+        }
         return {
           content: val,
           style: {
@@ -1221,6 +1244,9 @@
               val = val + ''
               val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
             }
+            if (plot.labelUnit) {
+              val = val + plot.labelUnit
+            }
 
             if (plot.$label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
               lablecfg.style.fill = plot.$colors.get(key)
@@ -1283,6 +1309,9 @@
             } else if (plot.show === 'thdSeparator') {
               val = val + ''
               val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
+            }
+            if (plot.labelUnit) {
+              val = val + plot.labelUnit
             }
             if (plot.$label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
               lablecfg.style.fill = plot.$colors.get(key)
@@ -1380,6 +1409,9 @@
               val = val + ''
               val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
             }
+            if (plot.labelUnit) {
+              val = val + plot.labelUnit
+            }
             if (plot.label === 'true' && plot.labelColor === 'custom' && item.color) {
               lablecfg.style.fill = item.color
             }
@@ -1446,6 +1478,9 @@
             } else if (item.show === 'thdSeparator') {
               val = val + ''
               val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
+            }
+            if (plot.labelUnit) {
+              val = val + plot.labelUnit
             }
 
             return {
@@ -1694,6 +1729,9 @@
             val = val + ''
             val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
           }
+          if (plot.labelUnit) {
+            val = val + plot.labelUnit
+          }
 
           if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
             lablecfg.style.fill = plot.$colors.get(key)
@@ -1780,6 +1818,9 @@
             val = val + ''
             val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
           }
+          if (plot.labelUnit) {
+            val = val + plot.labelUnit
+          }
 
           if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
             lablecfg.style.fill = plot.$colors.get(key)

--
Gitblit v1.8.0