Browse Source

首页功率曲线

刘靖诗 3 years ago
parent
commit
0e2b95cc89
1 changed files with 11 additions and 13 deletions
  1. 11 13
      src/components/chart/line/multiple-y-line-chart-normal.vue

+ 11 - 13
src/components/chart/line/multiple-y-line-chart-normal.vue

@@ -307,13 +307,14 @@ export default {
                     type: "value",
                     name: `${item.name}${item.unit}`,
                     nameLocation: p[item.position] % 2 == 0 ? "end" : "start",
+                    nameGap: 10,
                     min: item.min,
                     max: item.max,
                     position: item.position,
-                    offset: p[item.position] * 60,
+                    offset: p[item.position] * 50,
                     axisLabel: {
                         formatter: "{value}",
-                        fontSize: util.vh(14),
+                        fontSize: 12,
                     },
                     //分格线
                     splitLine: {
@@ -349,9 +350,7 @@ export default {
                             width: 1,
                         },
                     },
-                    itemStyle: {
-                        opacity: 0,
-                    },
+                    showSymbol: false,
                     yAxisIndex: value.yAxisIndex,
                     data: value.value.map((t) => {
                         return t.value;
@@ -368,7 +367,6 @@ export default {
             const chart = echarts.init(this.$el);
 
             let option = this.option();
-            console.log(option)
             chart.clear();
             chart.setOption(option);
 
@@ -387,13 +385,13 @@ export default {
                     borderColor: partten.getColor("gray"),
                     textStyle: {
                         color: "#fff",
-                        fontSize: 14,
+                        fontSize: 12,
                     },
                 },
                 legend: {
                     show: this.showLegend,
                     data: this.legend,
-                    top: 0,
+                    top: 'top',
                     icon: "circle",
                     itemWidth: 6,
                     inactiveColor: partten.getColor("gray"),
@@ -403,10 +401,10 @@ export default {
                     },
                 },
                 grid: {
-                    top: util.vh(32),
-                    left: util.vh(50),
-                    right: util.vh(50),
-                    bottom: util.vh(20),
+                    top: 27,
+                    left: 16,
+                    right: 16,
+                    bottom: 0,
                     containLabel: true,
                 },
                 xAxis: [
@@ -415,7 +413,7 @@ export default {
                         boundaryGap: false,
                         axisLabel: {
                             formatter: "{value}",
-                            fontSize: util.vh(14),
+                            fontSize: 12,
                             textStyle: {
                                 color: partten.getColor("gray"),
                             },