Skip to content

Commit

Permalink
fix: tooltip order
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Oct 12, 2024
1 parent b14efed commit 1024c59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/ui/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 1024c59

Please sign in to comment.