echarts图的数据过多设置dataZoom属性

dataZoom样式修改数据不堆积和滚动条差不多的

 dataZoom: [
          {
            type: "slider",
            show: true, //显示滚动条

            bottom: 20,
            showDataShadow: false, //是否显示数据阴影 默认auto
            borderColor: "transparent", //边框和背景颜色一致,(因为无法做到无边框,只能跟随页面背景)
            height: 10, //滚动条高度
            showDetail: false, //关闭:拖拽时候显示详细数值信息。
            fillerColor: "rgba(221, 225, 229, 1)", //滚动条颜色
            filterMode: "filter",
            realtime: true, //实时更新
            handleStyle: {
              borderWidth: 0,
              color: "rgba(221, 225, 229, 1)",
            }, //SVG图形填充颜色
            textStyle: {
              color: "transparent",
            },
            handleIcon:
              "path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z", //直接画一个圆形SVG矢量路径
            startValue: -6, // 重点在这   -- 开始的值
            endValue: -1, // 重点在这   -- 结束的值
            dataBackground: {
              lineStyle: {
                opacity: 0,
              },
              areaStyle: {
                opacity: 0,
              },
            },
            
         brushSelect: false,
            selectedDataBackground: {
              lineStyle: {
                opacity: 0,
              },
              areaStyle: {
                opacity: 0,
              },
              brushStyle: {
                borderColor: "#f00",
              },
            },
          },
          {
            type: "inside", //滚动条内置在坐标系中
            xAxisIndex: [0],
            startValue: -6, // 重点在这   -- 开始的值
            endValue: -1, // 重点在这   -- 结束的值
          },
        ],

dataZoom样式修改数据堆积数据的

  dataZoom: [
          {
            type: "slider",
            show: true, //显示滚动条
            // xAxisIndex: [0],
            bottom: 20,
            showDataShadow: false, //是否显示数据阴影 默认auto
            borderColor: "transparent", //边框和背景颜色一致,(因为无法做到无边框,只能跟随页面背景)
            height: 10, //滚动条高度
            showDetail: false, //关闭:拖拽时候显示详细数值信息。
            fillerColor: "rgba(221, 225, 229, 1)", //滚动条颜色
            filterMode: "filter",
            realtime: true, //实时更新
            handleStyle: {
              borderWidth: 0,
              color: "rgba(221, 225, 229, 1)",
            }, //SVG图形填充颜色
            textStyle: {
              color: "transparent",
            },
            handleIcon:
              "path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z", //直接画一个圆形SVG矢量路径
            startValue: -6, // 重点在这   -- 开始的值
            endValue: -2, // 重点在这   -- 结束的值
            dataBackground: {
              lineStyle: {
                opacity: 0,
              },
              areaStyle: {
                opacity: 0,
              },
            },
        //  moveHandleIcon: 'none',
        //  handleIcon: 'none',
        //  zoomLock: true,
        //  zoomOnMouseWheel: false,
         brushSelect: false, // 滚动条上面的阴影
            selectedDataBackground: {
              lineStyle: {
                opacity: 0,
              },
              areaStyle: {
                opacity: 0,
              },
              brushStyle: {
                borderColor: "#f00",
              },
            },
          },
          {
            type: "inside", //滚动条内置在坐标系中
            xAxisIndex: [0],
            startValue: -6, // 重点在这   -- 开始的值
            endValue: -2, // 重点在这   -- 结束的值
          },
        ],

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值