echarts的渲染问题

≯℡__Kan透↙ 提交于 2019-11-30 18:38:11

问题:柱状图的图例和柱状图颜色在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
          }
        );
      }
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!