fix: change Area component type from natural to monotone and add baseValue for improved chart rendering
This commit is contained in:
@@ -399,7 +399,7 @@ export default function Chart({ data, prevData, stats, prevStats, interval }: Ch
|
|||||||
|
|
||||||
{hasPrev && (
|
{hasPrev && (
|
||||||
<Area
|
<Area
|
||||||
type="natural"
|
type="monotone"
|
||||||
dataKey={chartMetric === 'visitors' ? 'prevVisitors' : 'prevPageviews'}
|
dataKey={chartMetric === 'visitors' ? 'prevVisitors' : 'prevPageviews'}
|
||||||
stroke={colors.axis}
|
stroke={colors.axis}
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
@@ -415,7 +415,8 @@ export default function Chart({ data, prevData, stats, prevStats, interval }: Ch
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<Area
|
<Area
|
||||||
type="natural"
|
type="monotone"
|
||||||
|
baseValue={0}
|
||||||
dataKey={chartMetric}
|
dataKey={chartMetric}
|
||||||
stroke={activeMetric.color}
|
stroke={activeMetric.color}
|
||||||
strokeWidth={2.5}
|
strokeWidth={2.5}
|
||||||
|
|||||||
Reference in New Issue
Block a user