From bc131131c5c96f8cb3bed679d4a359820c22e335 Mon Sep 17 00:00:00 2001
From: 15832144755 <67030627+15832144755@users.noreply.github.com>
Date: 星期四, 17 三月 2022 09:38:47 +0800
Subject: [PATCH] 3.17

---
 src/main/webapp/hxzk/plugins/apex/custom-apexcharts.js |   47 +++++++++++++++++++++++++++++++++++++----------
 1 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/src/main/webapp/hxzk/plugins/apex/custom-apexcharts.js b/src/main/webapp/hxzk/plugins/apex/custom-apexcharts.js
index 7fc9cb3..45e5472 100644
--- a/src/main/webapp/hxzk/plugins/apex/custom-apexcharts.js
+++ b/src/main/webapp/hxzk/plugins/apex/custom-apexcharts.js
@@ -499,8 +499,8 @@
 var tubiao22 = document.getElementById("donut-chart");
 var ceshi = echarts.init(tubiao22);
 var shuzu = [];
-for (var i=0; i<reA_k.length; i++) {
-    shuzu[i] = {value:reA_v[i],name:reA_k[i]}
+for (var i = 0; i < reA_k.length; i++) {
+    shuzu[i] = { value: reA_v[i], name: reA_k[i] }
 }
 var option;
 option = {
@@ -509,26 +509,29 @@
     },
     legend: {
         top: '2%',
-        left: 'center'
+        left: 'center',
+        textStyle: {
+      		color: '#d2d7d7'
+    	}
     },
     series: [
         {
-            name: 'Access From',
+            name: '宸ョ',
             type: 'pie',
             radius: ['40%', '70%'],
             avoidLabelOverlap: false,
-            itemStyle: {
-                borderRadius: 10,
-                borderColor: '#fff',
-                borderWidth: 2
-            },
+            //itemStyle: {
+            //    borderRadius: 10,
+            //    borderColor: '#fff',
+            //    borderWidth: 2
+            //},
             label: {
                 show: false,
                 position: 'center'
             },
             emphasis: {
                 label: {
-                    show: true,
+                    show: false,
                     fontSize: '40',
                     fontWeight: 'bold'
                 }
@@ -541,6 +544,30 @@
     ]
 };
 ceshi.setOption(option);
+var timesss = setInterval(quan, 10000);
+function quan() {
+    $.ajax({
+        url: "/hxzkoa/setgongzhongnum.do",
+        type: "POST",
+        dataType: "JSON",
+        success(data2) {
+            //donut.updateSeries(data2)
+            // donut.updateOptions({
+            //     series: data2[1],
+            //     labels: data2[0]
+            // })
+            var shuzu2 = [];
+            for (var i = 0; i < data2[1].length; i++) {
+                shuzu2[i] = { value: data2[1][i], name: data2[0][i] }
+            }
+            ceshi.setOption({
+                series: [{
+                    data: shuzu2
+                }]
+            });
+        }
+    });
+}
 
 
 // PolarArea Chart

--
Gitblit v1.10.0