guoshipeng
2022-10-27 8c9f89329256299c1cc68ed461e4f8621275aa7d
src/components/Echarts/LineChart.vue
@@ -65,10 +65,9 @@
    // }
  },
  mounted() {
    // this.$nextTick(() => {
    //   this.initChart()
    // })
    this.initChart()
    this.$nextTick(() => {
      this.initChart()
    })
  },
  beforeDestroy() {
    if (!this.chart) {
@@ -97,19 +96,19 @@
          boundaryGap: false,
          axisTick: {
            show: false
          },
          }
          // axisTick: { // 决定是否显示坐标刻度
          //   alignWithLabel: true,
          //   show: true
          // },
          axisLine: {
            lineStyle: {
              color: '#000000'
            }
          },
          axisLabel: {
            interval: this.interval
          }
          // axisLine: {
          //   lineStyle: {
          //     color: '#000000'
          //   }
          // },
          // axisLabel: {
          //   interval: this.interval
          // }
        },
        grid: {
          left: '5%',
@@ -144,24 +143,27 @@
        yAxis: {
          axisTick: {
            show: false // 轴线刻度
          },
          axisLine: {
            lineStyle: {
              color: '#000000'
            }
          }
          // axisLine: {
          //   lineStyle: {
          //     color: '#000000'
          //   }
          // }
        },
        legend: {
          data: val.title
          data: val.title,
          tooltip: {
            show: true
          }
        },
        // dataZoom: [{
        //   type: 'inside',
        //   start: 0,
        //   end: 100
        // }, {
        //   start: 0,
        //   end: 10
        // }],
        dataZoom: [{
          type: 'inside',
          start: 0,
          end: 100
        }, {
          start: 0,
          end: 10
        }],
        series: val.series
        // [{
        //   name: JSON.parse(JSON.stringify(val.title)),