Skip to content
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

如图,在折线图上如何实现点击折线上一个点后,保留tooltip的那根线以及展示x轴坐标在最顶端;以及如何修改提示点的样式为一个空心圆,提示线为虚线 #5999

Closed
asz97665 opened this issue Jan 2, 2024 · 7 comments · Fixed by #6292

Comments

@asz97665
Copy link

asz97665 commented Jan 2, 2024

问题描述

tooltip样式

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@pearmini
Copy link
Member

pearmini commented Jan 3, 2024

在折线图上如何实现点击折线上一个点后,保留tooltip的那根线以及展示x轴坐标在最顶端

这个没有办法内置实现,期望这个效果可以自己自定义交互

如何修改提示点的样式为一个空心圆

这个能力还没有,感兴趣提一个 PR 吗?比如

chart.interaction("tooltip", { markerType: 'hollow' })

提示线为虚线

chart.interaction("tooltip", { crosshairsLineDash: [3, 4] })

@hustcc hustcc added this to the Issue 计划 —— Tooltip milestone Jun 12, 2024
@Runtus
Copy link
Contributor

Runtus commented Jun 13, 2024

大佬,想问下,crossharisLineDash: [3,4] 这个数组表示的含义是什么呢

@pearmini
Copy link
Member

@Runtus [3, 4] 中3表示线段的长度,4表示线段之间的间距,可以看看这里的解释

@Runtus
Copy link
Contributor

Runtus commented Jun 14, 2024

我认领这个任务

@pearmini
Copy link
Member

pearmini commented Jun 14, 2024

@Runtus 这个算一个中级任务!

@Runtus
Copy link
Contributor

Runtus commented Jun 14, 2024

@pearmini 老哥,需要改下官网文档描述吗,因为markerType属于marker${StyleAttrs}中的,如果不特殊说明一下话,用户可能无法感知markerType: "hollow"的存在。

@pearmini
Copy link
Member

@Runtus 可以的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants