Skip to content

[Bug] Overflow truncate breaks axis label click target position #18306

@ianschmitz

Description

@ianschmitz

Version

5.4.1

Link to Minimal Reproduction

No response

Steps to Reproduce

Paste the following in the echarts example:

option = {
  xAxis: {
    axisLabel: {
      // BUG: Overflow: "truncate" breaks the click target on axis label
      overflow: 'truncate',
      width: 80
    },
    triggerEvent: true,
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    axisLabel: {
      // BUG: Overflow: "truncate" breaks the click target on axis label
      overflow: 'truncate',
      width: 80
    },
    triggerEvent: true,
    type: 'value'
  },
  series: [
    {
      data: [120, 200, 150, 80, 70, 110, 130],
      type: 'bar',
      showBackground: true,
      backgroundStyle: {
        color: 'rgba(180, 180, 180, 0.2)'
      }
    }
  ]
};

Current Behavior

Hovering mouse over an axis label should have a click target that is aligned with the axis label text. Click target is where mouse pointer is hovering in the screenshot:

image

Expected Behavior

Click target is aligned with axis label text.

Environment

- OS:macOS Monterey
- Browser: Chrome 109
- Framework:

Any additional comments?

Related issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions