Browse Source

柱状图,线别描述样式调整

xiaost 2 years ago
parent
commit
f1ee88c198

+ 5 - 1
src/components/echart/bottom/bottomLeft2Chart/chart.vue

@@ -161,7 +161,11 @@ export default {
                         let series2 = new Array();
                         for (let index = 0; index < dataList.length; index++) {
                           const element = dataList[index];
-                          xAxis0.push(element.sp_wccode);
+                          if(index%2 == 0) {
+                            xAxis0.push(element.sp_wccode);
+                          }else{
+                            xAxis0.push('\n'+element.sp_wccode);
+                          }
                           //投入
                          // series0.push(element.v_inqty);
                           //产出

+ 9 - 2
src/components/echart/bottom/bottomRightNgChart/chart.vue

@@ -34,7 +34,10 @@ export default {
         xAxis: [
           {
             type: 'category',
-            data:[]
+            data:[],
+            axisLabel: {
+              fontSize: 10
+            }
           }
         ],
         yAxis: [
@@ -83,7 +86,11 @@ export default {
                         let series0 = new Array();
                         for (let index = 0; index < dataList.length; index++) {
                           const element = dataList[index];
-                          xAxis0.push(element.linecode);
+                          if(index%2 == 0) {
+                            xAxis0.push(element.linecode);
+                          }else{
+                            xAxis0.push('\n'+element.linecode);
+                          }
                           //不良率
                           series0.push(element.value);
                         }