fix: switch from natural to bump interpolation to prevent overshoot

This commit is contained in:
Usman Baig
2026-03-13 13:53:38 +01:00
parent 87f5905bd6
commit 00d232ab3f

View File

@@ -451,7 +451,7 @@ export default function Chart({
</p> </p>
</div> </div>
) : ( ) : (
<div className="w-full overflow-hidden" onContextMenu={handleChartContextMenu}> <div className="w-full" onContextMenu={handleChartContextMenu}>
<ChartContainer <ChartContainer
config={chartConfig} config={chartConfig}
className="h-96 w-full overflow-visible [&_.recharts-curve.recharts-tooltip-cursor]:stroke-[initial]" className="h-96 w-full overflow-visible [&_.recharts-curve.recharts-tooltip-cursor]:stroke-[initial]"
@@ -527,13 +527,13 @@ export default function Chart({
})} })}
<Area <Area
type="natural" type="bump"
dataKey={metric} dataKey={metric}
fill="url(#areaFill)" fill="url(#areaFill)"
stroke="none" stroke="none"
/> />
<Line <Line
type="natural" type="bump"
dataKey={metric} dataKey={metric}
stroke={chartConfig[metric]?.color} stroke={chartConfig[metric]?.color}
strokeWidth={2} strokeWidth={2}