fix: tooltip order

This commit is contained in:
hamster1963 2024-10-12 22:45:36 +08:00
parent b14efedd18
commit 1024c597cf

View File

@ -172,6 +172,10 @@ const ChartTooltipContent = React.forwardRef<
return null;
}
payload.sort((a, b) => {
return Number(b.value) - Number(a.value);
});
const nestLabel = payload.length === 1 && indicator !== "dot";
return (