diff --git a/components/ui/chart.tsx b/components/ui/chart.tsx index 0cc3d7f9f..34560f474 100644 --- a/components/ui/chart.tsx +++ b/components/ui/chart.tsx @@ -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 (