首页 > 其他 > 详细

echarts的渲染问题

时间:2019-10-08 14:38:58      阅读:128      评论:0      收藏:0      [点我收藏+]

问题:柱状图的图例和柱状图颜色在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
          }
        );
      }

echarts的渲染问题

原文:https://www.cnblogs.com/zmdblog/p/11635064.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!