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

slider缩略轴,初始位置在顶部,结束位置距离初始位置很近的时候, 文本描述覆盖。 #4931

Closed
controllerz opened this issue May 4, 2023 · 8 comments
Assignees
Labels

Comments

@controllerz
Copy link

image

没有可以单独判断是否展示的参数, 并且单独设置。
期待的结果是:
image

@controllerz
Copy link
Author

@pearmini 请问有解决方案吗?

@pearmini
Copy link
Member

pearmini commented May 4, 2023

是希望在拖动过程中,可以隐藏藏和展示缩略轴的文本?

@pearmini pearmini added the V5 label May 4, 2023
@controllerz
Copy link
Author

是的, 默认现在是都展示, 所以就会出现距离接近的时候, 文本覆盖

@pearmini
Copy link
Member

pearmini commented May 4, 2023

目前不支持这个能力,如果希望支持这个能力,一种办法就是增加 transform 属性,可以对 label 进行防止重叠处理:

chart.slider('x', { transform: [ { type: 'autoHide' }] });

同时提供一些默认的防止重叠策略,或者有啥更好的 API 设计思路吗?

@controllerz
Copy link
Author

最好的就是自动隐藏。 或者是对文本描述加一些背景色, 做不透明处理。

1 similar comment
@controllerz
Copy link
Author

最好的就是自动隐藏。 或者是对文本描述加一些背景色, 做不透明处理。

@Aarebecca
Copy link
Contributor

新增了 autoFitLabel 选项,将其置为 false 即可,同时需要保证两边留出足够的 padding 空间

@controllerz
Copy link
Author

这个功能已经上线了吗? 文档上没看到有autoFitLabel 这个体现

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

No branches or pull requests

3 participants