浏览代码

资金统计图表自适应

ellisran 9 月之前
父节点
当前提交
5036c66f2b
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      app/public/js/financial_summary.js

+ 14 - 0
app/public/js/financial_summary.js

@@ -118,6 +118,20 @@ $(document).ready(function() {
         },
     }
 
+    let resizeTimer = null;
+    $(window).bind('resize', function () {
+        if (resizeTimer) clearTimeout(resizeTimer);
+        resizeTimer = setTimeout(function () {
+            echartsReset();
+        }, 500);
+    })
+
+    function echartsReset() {
+        tenderChart.resize();
+        payUsedChart.resize();
+        paySeChart.resize();
+    }
+
     //标段占比
     const tenderChart = echarts.init(document.getElementById('jlchart3'));
     const tenderOption = {