From 2682e38fcea26a70d3bac34c79931973b989eab5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 10 十二月 2023 19:12:14 +0800
Subject: [PATCH] 2023-12-10

---
 src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx |  114 +++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 87 insertions(+), 27 deletions(-)

diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
index 6fb1663..93d5a34 100644
--- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -273,6 +273,28 @@
     }])
   }
 
+  let axis = []
+  if (card.grid !== 'hidden') {
+    axis.push('grid')
+  }
+  if (card.x_line !== 'hidden') {
+    axis.push('x_line')
+  }
+  if (card.y_line !== 'hidden') {
+    axis.push('y_line')
+  }
+  if (card.tick !== 'hidden') {
+    axis.push('tick')
+  }
+
+  let tickVals = []
+  if (card.x_label !== 'hidden') {
+    tickVals.push('x_label')
+  }
+  if (card.y_label !== 'hidden') {
+    tickVals.push('y_label')
+  }
+
   return [
     {
       type: 'radio',
@@ -504,32 +526,70 @@
         label: '鏋佸潗鏍�'
       }]
     }, {
-      type: 'radio',
-      field: 'grid',
-      label: '缃戞牸绾�',
-      initval: card.grid || 'show',
+      type: 'checkbox',
+      field: 'axis',
+      label: '鍧愭爣杞�',
+      initval: axis,
       required: false,
       options: [{
-        value: 'show',
-        label: '鏄剧ず'
+        value: 'grid',
+        label: '缃戞牸绾�'
       }, {
-        value: 'hidden',
-        label: '闅愯棌'
-      }]
+        value: 'x_line',
+        label: 'X杞�'
+      }, {
+        value: 'y_line',
+        label: 'Y杞�'
+      }, {
+        value: 'tick',
+        label: '鍒诲害绾�'
+      }],
+      controlFields: [
+        {field: 'lineColor', notNull: true},
+      ]
     }, {
-      type: 'radio',
-      field: 'y_line',
-      label: 'y杞磋竟绾�',
-      initval: card.y_line || 'hidden',
-      tooltip: '鍥惧舰宸︿晶鎴栧彸渚х殑杈圭嚎銆�',
+      type: 'checkbox',
+      field: 'tickVals',
+      label: '鍒诲害鍊�',
+      initval: tickVals,
       required: false,
       options: [{
-        value: 'show',
-        label: '鏄剧ず'
+        value: 'x_label',
+        label: 'X杞�'
       }, {
-        value: 'hidden',
-        label: '闅愯棌'
-      }]
+        value: 'y_label',
+        label: 'Y杞�'
+      }],
+      controlFields: [
+        {field: 'color', notNull: true},
+      ]
+    // }, {
+    //   type: 'radio',
+    //   field: 'grid',
+    //   label: '缃戞牸绾�',
+    //   initval: card.grid || 'show',
+    //   required: false,
+    //   options: [{
+    //     value: 'show',
+    //     label: '鏄剧ず'
+    //   }, {
+    //     value: 'hidden',
+    //     label: '闅愯棌'
+    //   }]
+    // }, {
+    //   type: 'radio',
+    //   field: 'y_line',
+    //   label: 'y杞磋竟绾�',
+    //   initval: card.y_line || 'hidden',
+    //   tooltip: '鍥惧舰宸︿晶鎴栧彸渚х殑杈圭嚎銆�',
+    //   required: false,
+    //   options: [{
+    //     value: 'show',
+    //     label: '鏄剧ず'
+    //   }, {
+    //     value: 'hidden',
+    //     label: '闅愯棌'
+    //   }]
     }, {
       type: 'radio',
       field: 'download',
@@ -602,17 +662,17 @@
       required: false
     }, {
       type: 'color',
-      field: 'color',
-      label: '鍒诲害鍊奸鑹�',
-      initval: card.color || 'rgba(0, 0, 0, 0.65)',
-      tooltip: '鍒诲害鍊肩殑鏂囧瓧棰滆壊銆�',
+      field: 'lineColor',
+      label: '鍧愭爣杞撮鑹�',
+      initval: card.lineColor || '',
+      tooltip: '鍧愭爣杞寸嚎鐨勯鑹诧紝鍖呮嫭x杞淬�亂杞淬�佺綉鏍肩嚎銆佸埢搴︾嚎銆�',
+      allowClear: true,
       required: false
     }, {
       type: 'color',
-      field: 'lineColor',
-      label: '杞寸嚎棰滆壊',
-      initval: card.lineColor,
-      tooltip: '鍧愭爣杞寸嚎鐨勯鑹诧紝鍖呮嫭x杞淬�亂杞村強缃戞牸绾裤��',
+      field: 'color',
+      label: '鍒诲害鍊奸鑹�',
+      initval: card.color || '',
       allowClear: true,
       required: false
     }, {

--
Gitblit v1.8.0