Skip to content

[Bug] axisLabel设置了 overflow: 'truncate'后部分label无法响应点击事件 #17343

@Thj007

Description

@Thj007

Version

5.2.2

Link to Minimal Reproduction

No response

Steps to Reproduce

option = {
  title: {
    text: 'World Population'
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow'
    }
  },
  legend: {},
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: {
    type: 'value'
  },
  yAxis: {
    triggerEvent: true,
    axisLabel: {
      width: 60,
      interval: 0,
      overflow: 'truncate'
    },
    data: ['Brazil', 'Indonesia', 'USA', 'India', 'China', 'World']
  },
  series: [
    {
      name: '2011',
      type: 'bar',
      data: [18203, 23489, 29034, 104970, 131744, 630230]
    }
  ]
};

点击事件监听

myChart.on('click', 'yAxis', function(params) {
    console.log('click-params', params)
})

Current Behavior

  1. 设置yAxis文本超出溢出显示...
  2. 监听点击yAxis的label进行一些处理
  3. 但是目前点击没有....的label后端无法响应事件

Expected Behavior

  1. 点击yAxis的所有label都能响应事件

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpendingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.topic: label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions