zpf há 1 ano atrás
pai
commit
439d6d4e08
1 ficheiros alterados com 17 adições e 2 exclusões
  1. 17 2
      src/views/cockpitNew1/hysy.vue

+ 17 - 2
src/views/cockpitNew1/hysy.vue

@@ -219,8 +219,23 @@ export default {
                         }
                     },
                     axisLabel: {
-                        fontSize: 12,
-                        color: '#fff',
+                        show: true,
+                        rotate: 0, //35度角倾斜显示
+                        interval: 0,
+                        textStyle: {
+                            color: "#fff",
+                            fontSize: 12,
+                        },
+                        formatter: function (value) {
+                            let fast = "";
+                            if (value.length >= 5) {
+                                fast = value.slice(0, 5);
+                                fast += "...";
+                            } else {
+                                fast = value;
+                            }
+                            return fast;
+                        },
                     },
                 },
                 yAxis: [