quanyawei
2023-11-21 6738d48087c2c89d136eaf2a494c61392e087b54
src/views/toCarryOutLegislativeReforms/summaryPage/components/reportTypeEcharts.vue
@@ -36,7 +36,7 @@
    }
  },
  watch: {
    'cylindricalityData': {
    cylindricalityData: {
      handler(newVal) {
        console.log('newVal', newVal)
        this.seriesData = []
@@ -44,15 +44,18 @@
        const arr = []
        newVal.forEach(item => {
          arr.push({
            name: item.name,
            type: 'bar',
            barWidth: '40%',
            data: [item.value]
          })
          arr.push(item.value)
          this.namelist.push(item.name)
        })
        this.seriesData = arr
        this.seriesData = [
          {
            type: 'bar',
            barWidth: '40%',
            data: arr
          }
        ]
        console.log('this.seriesData', this.seriesData)
        console.log('this.namelist', this.namelist)
        this.$nextTick(() => {
          this.initChart()
        })
@@ -110,37 +113,41 @@
            bottom: '3%',
            containLabel: true
          },
          xAxis: [{
            type: 'category',
            data: this.namelist,
            axisTick: {
              show: false,
              alignWithLabel: true
            },
            axisLine: {
              show: false
            },
            axisLabel: {
              color: '#989898'
            }
          }],
          yAxis: [{
            type: 'value',
            axisTick: {
              show: false
            },
            axisLine: {
              show: false
            },
            splitLine: {
              lineStyle: {
                color: '#ebebeb'
          xAxis: [
            {
              type: 'category',
              data: this.namelist,
              axisTick: {
                show: false,
                alignWithLabel: true
              },
              axisLine: {
                show: false
              },
              axisLabel: {
                color: '#989898'
              }
            },
            axisLabel: {
              color: '#8c8c8c'
            }
          }],
          ],
          yAxis: [
            {
              type: 'value',
              axisTick: {
                show: false
              },
              axisLine: {
                show: false
              },
              splitLine: {
                lineStyle: {
                  color: '#ebebeb'
                }
              },
              axisLabel: {
                color: '#8c8c8c'
              }
            }
          ],
          series: this.seriesData
        },
        true