Prechádzať zdrojové kódy

允许自定义柱状图/折线图最大值最小值

zhuth 7 rokov pred
rodič
commit
7ecbb3a95b
1 zmenil súbory, kde vykonal 7 pridanie a 3 odobranie
  1. 7 3
      kanban-client/app/component/converter.js

+ 7 - 3
kanban-client/app/component/converter.js

@@ -202,7 +202,9 @@ function barConfig(model) {
                         textStyle: {
                             fontSize: getFontSize() * .7
                         }
-                    }
+                    },
+                    max: yconfig.max || null,
+                    min: yconfig.min || null
                 }],
                 series: getBarSeries(fontSize, layout, series, barconfig)
             }
@@ -303,7 +305,9 @@ function lineConfig(model) {
                         textStyle: {
                             fontSize: fontSize || getFontSize() * .7
                         }
-                    }
+                    },
+                    max: yconfig.max || null,
+                    min: yconfig.min || null
                 }],
                 series: getLineSeries(fontSize, series, lineconfig),
                 dataZoom: series.length > 0 ? [
@@ -847,7 +851,7 @@ function wrapText(text, fontSize, width) {
 
 }
 String.prototype.insert = function(str, index){
-    let newstr = "";             //初始化一个空字符串
+    let newstr = "";
     let tmp = this.substring(0, index);
     let estr = this.substring(index, this.length);
     newstr += tmp + str + estr;