ant-design / ant-design-charts

A React Chart Library
https://ant-design-charts.antgroup.com/
MIT License
1.91k stars 361 forks source link

🐛[BUG] Tooltip customItems not changes title #1532

Closed lajos-vlasics closed 1 year ago

lajos-vlasics commented 2 years ago

🐛 bug 描述 [详细地描述 bug,让大家都能理解]

The tooltip customItems callback does not changes the 'title' (it works for 'name', or the 'value' field).

📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]

With the customItems callback, map the original tooltip items and change the 'title' field.

🏞 期望结果 [描述你原本期望看到的结果]

The title is actually modified in the tooltip.

💻 复现代码 [提供可复现的代码,仓库,或线上示例]

https://codesandbox.io/s/ant-chart-customitems-not-changes-tooltip-title-fqnd0n?file=/App.tsx

© 版本信息

🚑 其他信息 [如截图等其他信息可以贴在这里]

lxfu1 commented 2 years ago

https://charts.ant.design/en/docs/api/case#custom-tooltip

lxfu1 commented 2 years ago

No title!

image image

Tiepbm commented 2 years ago

@lxfu1 I used to customItems to filter tooltip. But it not effect

image image

result: image

ant-design-charts v1.4.2

thanks!