fix: change Area component type from natural to monotone and add baseValue for improved chart rendering

This commit is contained in:
Usman Baig
2026-01-19 18:30:11 +01:00
parent 500310048a
commit ecac8002ae

View File

@@ -399,7 +399,7 @@ export default function Chart({ data, prevData, stats, prevStats, interval }: Ch
{hasPrev && (
<Area
type="natural"
type="monotone"
dataKey={chartMetric === 'visitors' ? 'prevVisitors' : 'prevPageviews'}
stroke={colors.axis}
strokeWidth={2}
@@ -415,7 +415,8 @@ export default function Chart({ data, prevData, stats, prevStats, interval }: Ch
)}
<Area
type="natural"
type="monotone"
baseValue={0}
dataKey={chartMetric}
stroke={activeMetric.color}
strokeWidth={2.5}