echarts的渲染問題


問題:柱狀圖的圖例和柱狀圖顏色在IE10和IE11中拖動時間軸的時候圖例和柱狀圖顏色會發生改變

echarts的渲染是從setOption中開始的,不是從echarts.init()開始

initPapers(a) {
      if (!this.firstDepartmentLoaded) {
        this.myChart = echarts.init(this.$refs.paperNum);
        this.myChart.setOption(
          {
            color: this.colorArr,
            tooltip: {
              trigger: "axis",
              axisPointer: {
                type: "cross",
                label: {
                  backgroundColor: "#6a7985"
                }
              }
            },
            legend: {
              data: this.lengedName,
              right: 30
            },
            grid: {
              left: "3%",
              right: "4%",
              bottom: "3%",
              containLabel: true
            },
            xAxis: {
              axisTick: { show: false },
              splitLine: { show: false },
              axisLine: { lineStyle: { color: "#CFD8DC" } },
              axisLabel: {
                show: true,
                interval: 0,
                rotate: 60,
                textStyle: {
                  color: "#323232",
                  fontSize: 12
                }
              },
              data: this.departmentsOrderName
            },
            yAxis: {
              axisLine: {
                show: false
              },
              axisTick: {
                show: false
              },
              splitLine: {
                show: true,
                lineStyle: {
                  color: "#CFD8DC",
                  width: 1
                }
              }
            },
            series: a
          },
          true
        );
      } else {
        this.myChart.setOption(
          {
            xAxis: {
              data: this.departmentsOrderName
            },
            series: a
          }
        );
      }


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM