duwendi 1 year ago
parent
commit
46153620d2
2 changed files with 3 additions and 0 deletions
  1. 2 0
      src/components/lineChart.vue
  2. 1 0
      src/pages/index/components/business_overview.vue

+ 2 - 0
src/components/lineChart.vue

@@ -12,6 +12,7 @@ export default {
12 12
     encode: { type: Array, required: true },
13 13
     yAxisName: { type: String },
14 14
     xlabelFormat: { type: Function },
15
+    rotate: {type: Number, default: 0},
15 16
     tooltipFormat: { type: Function },
16 17
     colorIdx: { type: Number },
17 18
     colors: { type: Array, default: () => colors },
@@ -72,6 +73,7 @@ export default {
72 73
             color: "#59BEED",
73 74
             fontSize: this.labelSize,
74 75
             interval: 0,
76
+            rotate: this.rotate || 0, //文字旋转
75 77
           },
76 78
           axisLine: {
77 79
             lineStyle: {

+ 1 - 0
src/pages/index/components/business_overview.vue

@@ -62,6 +62,7 @@
62 62
           yAxisName="(车次)"
63 63
           :dataset="linedata"
64 64
           :tooltipFormat="lineTooltipFormat1"
65
+          :rotate="30"
65 66
           :encode="[
66 67
               { x: 'mouth', y: 'lastYearAmount', seriesName: '今日',bool:'true' },
67 68
               { x: 'mouth', y: 'thisYearAmount', seriesName: '昨日',bool:'true' },