Skip to content

[Bug]: Incorrect Tooltip Data on Initial Render for Grouped Column Chart with Scrollbar #2871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 of 10 tasks
lnvtphu opened this issue Mar 22, 2025 · 0 comments
Open
3 of 10 tasks
Labels
G2 G2问题 waiting for maintainer Triage or intervention needed from a maintainer

Comments

@lnvtphu
Copy link

lnvtphu commented Mar 22, 2025

Describe the bug / 问题描述

When using a grouped column chart (isGroup: true) with a scrollbar (scrollbar: { type: 'horizontal', ratio: 0.3 }), the tooltip shows incorrect data on initial render.

On first load:

  • Hovering over the 4th column of the 1st group shows the tooltip for a column in the 2nd group instead.
  • However, after scrolling the chart slightly, the tooltip behavior corrects itself and displays accurate values.

This seems like a render sync or layout issue that affects the hover hitboxes before any user interaction with the scrollbar.

Note: The highlight background is not cover the group column too

const DemoColumn = () => {
  const config = {
    data: {
      type: 'fetch',
      value: 'https://gw.alipayobjects.com/os/antfincdn/iPY8JFnxdb/dodge-padding.json',
    },
    xField: '月份',
    yField: '月均降雨量',
    colorField: 'name',
    group: true,
    style: {
      // 矩形四个方向的内边距
      inset: 5,
      // 矩形单个方向的内边距
      // insetLeft:5,
      // insetRight:20,
      // insetBottom:10
      // insetTop:10
    },
    scrollbar: {
      x: {
        ratio: 0.2,
      },
    },
  };
  return <Column {...config} />;
};
Video.2025-03-22.113722.mp4

Reproduction link / 复现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

🆕 2.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
@lnvtphu lnvtphu added the waiting for maintainer Triage or intervention needed from a maintainer label Mar 22, 2025
@lxfu1 lxfu1 added the G2 G2问题 label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
G2 G2问题 waiting for maintainer Triage or intervention needed from a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants