From 772308eba58d2209e7cc108dc5567ef4ca7ee3b2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 15 四月 2021 16:17:20 +0800
Subject: [PATCH] 2021-04-15

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

diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx
index a80aa93..2c27c5f 100644
--- a/src/menu/components/chart/antv-bar/index.jsx
+++ b/src/menu/components/chart/antv-bar/index.jsx
@@ -51,6 +51,7 @@
         width: card.width || 24,
         height: 400,
         barSize: 35,
+        color: 'rgba(0, 0, 0, 0.65)',
         name: card.name
       }
 
@@ -195,7 +196,7 @@
   linerender = () => {
     const { card } = this.state
     let plot = {...card.plot, height: card.plot.height - 80} // 鍘婚櫎title鎵�鍗犵┖闂�
-    let color = plot.color || 'rgba(0, 0, 0, 0.85)'
+    let color = plot.color || 'rgba(0, 0, 0, 0.65)'
     let X_axis = plot.Xaxis || 'x'
     let Y_axis = plot.Yaxis || ['y']
 
@@ -236,8 +237,10 @@
   
       chart.data(dv.rows)
 
-      chart.axis(X_axis, { label: { style: { fill: color } }, line: { style: { fill: color } } })
-      chart.axis('value', { grid: { style: { fill: color } }, label: { style: { fill: color } } })
+      // chart.axis(X_axis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } })
+      // chart.axis('value', { grid: { line: { style: { stroke: color } }}, label: { style: { fill: color } } })
+      chart.axis(X_axis, { label: { style: { fill: color } } })
+      chart.axis('value', { label: { style: { fill: color } } })
   
       if (plot.coordinate !== 'polar') {
         chart.scale(X_axis, {
@@ -349,7 +352,7 @@
   customrender = (data) => {
     let card = fromJS(this.state.card).toJS()
     let plot = {...card.plot, height: card.plot.height - 80} // 鍘婚櫎title鎵�鍗犵┖闂�
-    let color = plot.color || 'rgba(0, 0, 0, 0.85)'
+    let color = plot.color || 'rgba(0, 0, 0, 0.65)'
     let fields = []
     let legends = []
     let transfield = {}
@@ -396,7 +399,8 @@
 
       if (item.axis === 'true' && axisIndex < 2) {
         if (axisIndex === 0) {
-          item.axis = { grid: {style: { fill: color }}, title: { style: { fill: color } }, label: {style: { fill: color }} }
+          // item.axis = { grid: {line: { style: { stroke: color } }}, title: { style: { fill: color } }, label: {style: { fill: color }} }
+          item.axis = { title: { style: { fill: color } }, label: {style: { fill: color }} }
           fields.unshift(item)
         } else {
           item.axis = { grid: null, title: {style: { fill: color }}, label: {style: { fill: color }} }
@@ -435,7 +439,8 @@
 
     chart.data(dv.rows)
 
-    chart.axis(plot.Xaxis, { label: { style: { fill: color } }, line: { style: { fill: color } } })
+    // chart.axis(plot.Xaxis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } })
+    chart.axis(plot.Xaxis, { label: { style: { fill: color } } })
 
     if (!hasBar) {
       chart.scale(plot.Xaxis, {
@@ -556,7 +561,7 @@
   barrender = () => {
     const { card } = this.state
     let plot = {...card.plot, height: card.plot.height - 80}
-    let color = plot.color || 'rgba(0, 0, 0, 0.85)'
+    let color = plot.color || 'rgba(0, 0, 0, 0.65)'
     let X_axis = plot.Xaxis || 'x'
     let Y_axis = plot.Yaxis || ['y']
 
@@ -598,8 +603,10 @@
   
       chart.data(dv.rows)
 
-      chart.axis(X_axis, { label: { style: { fill: color } }, line: { style: { fill: color } } })
-      chart.axis('value', { grid: { style: { fill: color } }, label: { style: { fill: color } } })
+      // chart.axis(X_axis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } })
+      // chart.axis('value', { grid: { line: { style: { stroke: color } }}, label: { style: { fill: color } } })
+      chart.axis(X_axis, { label: { style: { fill: color } } })
+      chart.axis('value', { label: { style: { fill: color } } })
   
       chart.scale('value', {
         nice: true,

--
Gitblit v1.8.0