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 标题的默认格式化方式 #5684

Closed
1 task done
hustcc opened this issue Oct 25, 2023 · 3 comments
Closed
1 task done

tooltip 标题的默认格式化方式 #5684

hustcc opened this issue Oct 25, 2023 · 3 comments
Assignees

Comments

@hustcc
Copy link
Member

hustcc commented Oct 25, 2023

AntV Open Source Contribution Plan(可选)

  • 我同意将这个 Issue 参与 OSCP 计划

Issue 难度

中等难度

任务介绍

当图表中 encode 的 x 为日期字段的时候,tooltip title 会默认显示 x 轴的数据,对于日期的默认格式化效果不是很友好。

image

期望有更好的默认格式化效果,自动根据数据的情况,选择是 YYMMDD 还是更细的粒度。

详细介绍

No response

参考说明

@BENcorry
Copy link
Contributor

BENcorry commented Nov 3, 2023

【BENcorry 认领】

@BENcorry
Copy link
Contributor

BENcorry commented Nov 6, 2023

方案:

  1. 判断当前tooltip options title 是否有处理
  2. 如果无处理,对当前title进行值判断是否为Date,如果不是,不做处理
  3. 如果是,动态判断当前时间值给予YYYY-MM-DD 或者是YYYY-MM-DD HH:mm:ss

pearmini pushed a commit that referenced this issue Nov 9, 2023
Co-authored-by: ben.wen <ben.wen@narwal.com>
Exlau pushed a commit to Exlau/G2 that referenced this issue Nov 10, 2023
Co-authored-by: ben.wen <ben.wen@narwal.com>
@hustcc hustcc closed this as completed Nov 13, 2023
@pearmini
Copy link
Member

@BENcorry

感谢对 G2 对贡献!欢迎加入下面的群,进一步贡献和了解更多:

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

No branches or pull requests

3 participants