Incubator-echarts: 移动端柱状图加入DataZoom以后,只能点击图表两侧才能滑动,想点图表区也能滑动,有什么解决办法吗

Created on 27 Apr 2018  ·  3Comments  ·  Source: apache/incubator-echarts


代码

One-line summary [问题简述]

移动端柱状图加入DataZoom以后,只能点击图表两侧才能滑动
,想点图表区也能滑动,有什么解决办法吗

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 4.0.4
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

ECharts option [ECharts配置项]


{
          tooltip: {
            trigger: 'axis',
            axisPointer: {
              label: {
                backgroundColor: '#6a7985'
              }
            },
            backgroundColor: 'rgba(0,0,0,0.70)',
            padding: 15,
            textStyle: {
              fontSize: 12
            }
          },
          xAxis: [
            {
              type: 'category',
              data: this.data[index].nameList ? this.data[index].nameList : [],
              axisPointer: {
                type: 'line'
              },
              axisLabel: {
                fontSize: 14,
                color: '#5C5C5C',
              },
              axisLine: {
                lineStyle: {
                  color: '#E2E4E9',
                  width: 1,
                }
              },
              axisTick: {
                show: false
              }
            }
          ],
          yAxis: [
            {
              type: 'value',
              min: -100,
              max: 100,
              interval: 20,
              scale: true,
              nameTextStyle: {
                color: ' #8E8E93',
                fontSize: 14
              },
              axisLabel: {
                fontSize: 14,
                color: '#5C5C5C'
              },
              axisLine: {
                lineStyle: {
                  color: '#E2E4E9',
                  width: 1
                }
              },
              axisTick: {
                show: false
              },
              splitLine: {
                show: true,
                lineStyle: {
                  color: '#E2E4E9',
                  width: 1
                }
              }
            }
          ],
          grid: {
            top: 45,
            left: 15,
            right: 15,
            bottom: 40,
            containLabel: true
          },
          dataZoom: [{
            type: 'inside',
            start: 0,
            end: 100,
            zoomLock: true
          }, {
            start: 0,
            end: 100,
            zoomLock: true,
            handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
            handleSize: '80%',
            handleStyle: {
              color: '#fff',
              shadowBlur: 3,
              shadowColor: 'rgba(0, 0, 0, 0.6)',
              shadowOffsetX: 0,
              shadowOffsetY: 0
            }
          }],
          series: [
            {
              type: 'line',
              data: this.data[index].otherLineList ? this.data[index].otherLineList : [],
              symbol: 'circle',
              symbolSize: 6,
              itemStyle: {
                normal: {
                  color: '#5AD6F4',
                  borderWidth: 1,
                  lineStyle: {
                    color: '#5AD6F4'
                  },
                  show: true,
                  textStyle: {
                    fontSize: 30
                  }
                }
              },
              label: {
                normal: {
                  show: false,
                  position: 'top',
                  fontSize: 12,
                  distance: 9,
                  color: '#333333'
                }
              }
            },
            {
              type: 'line',
              data: this.data[index].increaseRateLineList ? this.data[index].increaseRateLineList : [],
              symbol: 'circle',
              symbolSize: 6,
              itemStyle: {
                normal: {
                  color: '#F56954',
                  borderWidth: 1,
                  lineStyle: {
                    color: '#F56954'
                  },
                  show: true,
                  textStyle: {
                    fontSize: 30
                  }
                }
              },
              label: {
                normal: {
                  show: false,
                  position: 'top',
                  fontSize: 12,
                  distance: 9,
                  color: '#333333'
                }
              }
            }
          ]
        }

Other comments [其他信息]


stale

Most helpful comment

我也遇到了这个问题!!!!

All 3 comments

我也遇到了这个问题!!!!

解决了吗,

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marine1ly picture marine1ly  ·  3Comments

Zendic picture Zendic  ·  3Comments

kirazxyun picture kirazxyun  ·  3Comments

akvaliya picture akvaliya  ·  3Comments

jarben picture jarben  ·  3Comments