VisActor / VisActor/VChart

[Bug] click触发自定义tooltip,初始位置计算错误

Open
#4,097 1 comment 0 reactions 1 assignee View on GitHub

@xuefei1313 is already working on this.

Since Jul 25, 2025.

bug interaction react-vchart test tooltip
Dominant language
TypeScript
Stars
1.8k
Forks
221
Avg merge
1d 6h
Merged PRs (30d)
26

Description

Version

latest

Link to Minimal Reproduction

https://visactor.io/vchart/demo-react/usage/line-default-select

Steps to Reproduce

添加如下配置

tooltip: {
    trigger: 'click',
    tooltipRender: () => {
      return <div style={{ height: 400 }}>123</div>
    }
  },

click触发tooltip渲染

Current Behavior

Image

当click触发自定义渲染的tooltip时,初始渲染总是会渲染在鼠标旁边,即使下方已经没有位置了,这会导致tooltip被遮挡

Expected Behavior

当click触发自定义渲染的tootip时,初始渲染可以正确计算tooltip位置,使其不被遮挡

Environment
- OS:
- Browser:
- Framework:
Any additional comments?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.