duwendi 1 年之前
父节点
当前提交
46153620d2
共有 2 个文件被更改,包括 3 次插入0 次删除
  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
     encode: { type: Array, required: true },
12
     encode: { type: Array, required: true },
13
     yAxisName: { type: String },
13
     yAxisName: { type: String },
14
     xlabelFormat: { type: Function },
14
     xlabelFormat: { type: Function },
15
+    rotate: {type: Number, default: 0},
15
     tooltipFormat: { type: Function },
16
     tooltipFormat: { type: Function },
16
     colorIdx: { type: Number },
17
     colorIdx: { type: Number },
17
     colors: { type: Array, default: () => colors },
18
     colors: { type: Array, default: () => colors },
@@ -72,6 +73,7 @@ export default {
72
             color: "#59BEED",
73
             color: "#59BEED",
73
             fontSize: this.labelSize,
74
             fontSize: this.labelSize,
74
             interval: 0,
75
             interval: 0,
76
+            rotate: this.rotate || 0, //文字旋转
75
           },
77
           },
76
           axisLine: {
78
           axisLine: {
77
             lineStyle: {
79
             lineStyle: {

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

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