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可以显示堆叠总值吗 #1565

Open
DanyZzzzz opened this issue Aug 9, 2024 · 1 comment
Open

使用堆叠柱状图后,Tooltip可以显示堆叠总值吗 #1565

DanyZzzzz opened this issue Aug 9, 2024 · 1 comment

Comments

@DanyZzzzz
Copy link

BizCharts Version: v4.1.23
以下图为例
image

@zkk0809
Copy link

zkk0809 commented Dec 19, 2024

可以在原来的tooltip基础上增加自定义内容:
<Tooltip
shared
customItems={(items) => {
const obj = {
title: items[0]?.title,
name:,
color:,
marker: true,
value: items.reduce((total, current) => {
return total + Number(current.value);
}, 0),
};
let newItems = items.concat(obj);
return newItems;
}}
/>

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

No branches or pull requests

2 participants