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/tabviews/custom/components/chart/antv-dashboard/index.jsx |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
index 46a23ab..2fe7eb4 100644
--- a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -304,27 +304,33 @@
   }
 
   /**
-   * @description 楗煎浘娓叉煋
+   * @description 浠〃鐩樻覆鏌�
    */
   dashboardrender = () => {
     const { plot, chartId, data } = this.state
+
+    let _data = fromJS(data).toJS()
+    if (_data.value && _data.value > plot.maxValue) {
+      _data.value = plot.maxValue
+    }
+
     const chart = new Chart({
       container: chartId,
       autoFit: true,
       height: plot.height ? (plot.height - 80) : 320,
       padding: [0, 0, 0, 0],
     })
-    chart.data([data]);
+    chart.data([_data]);
     chart.scale('value', {
       min: 0,
       max: plot.maxValue,
       tickInterval: plot.tickInterval,
-    });
+    })
     chart.coordinate('polar', {
       startAngle: (-9 / 8) * Math.PI,
       endAngle: (1 / 8) * Math.PI,
       radius: 0.75,
-    });
+    })
 
     chart.axis('1', false);
     chart.axis('value', {
@@ -345,9 +351,9 @@
         }
       },
       grid: null,
-    });
-    chart.legend(false);
-    chart.tooltip(false);
+    })
+    chart.legend(false)
+    chart.tooltip(false)
     chart
       .point()
       .position('value*1')
@@ -371,7 +377,7 @@
         appear: {
           animation: 'fade-in'
         }
-      });
+      })
 
     // 缁樺埗浠〃鐩樿儗鏅�
     chart.annotation().arc({
@@ -394,7 +400,7 @@
           lineWidth: 18,
           lineDash: null,
         },
-      });
+      })
     } else {
       let start = 0
       plot.colors.forEach(item => {
@@ -438,7 +444,7 @@
           textAlign: 'center',
         },
         offsetY: 15,
-      });
+      })
     }
 
     chart.render()

--
Gitblit v1.8.0