소스 검색

高度图表缩放

laiguoran 3 년 전
부모
커밋
83c5dd1379
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      app/view/dashboard/index.ejs

+ 4 - 2
app/view/dashboard/index.ejs

@@ -592,7 +592,7 @@
             {
                 name: '审批次数',
                 type: 'pie',
-                radius: ['50%', '75%'],
+                radius: ['35%', '55%'],
                 center: ['50%', '50%'],
                 avoidLabelOverlap: false,
                 data: [
@@ -615,7 +615,9 @@
     };
     function optionRadius() {
         if ($(window).outerWidth() > 1366) {
-            if ($('#jechart').outerWidth() < 320) {
+            if ($('#jechart').outerWidth() - $('#jechart').outerHeight() < 90) {
+                option.series[0].radius = ['35%', '55%'];
+            } else if ($('#jechart').outerWidth() < 320) {
                 option.series[0].radius = ['35%', '60%'];
             } else if ($('#jechart').outerWidth() < 330) {
                 option.series[0].radius = ['40%', '65%'];