diff --git a/components/dashboard/ScrollDepth.tsx b/components/dashboard/ScrollDepth.tsx index 9409420..fa53586 100644 --- a/components/dashboard/ScrollDepth.tsx +++ b/components/dashboard/ScrollDepth.tsx @@ -22,10 +22,13 @@ export default function ScrollDepth({ goalCounts, totalPageviews }: ScrollDepthP const hasData = scrollCounts.size > 0 && totalPageviews > 0 - const chartData = THRESHOLDS.map((threshold) => ({ - label: `${threshold}%`, - value: totalPageviews > 0 ? Math.round(((scrollCounts.get(threshold) ?? 0) / totalPageviews) * 100) : 0, - })) + const chartData = [ + { label: '0%', value: 100 }, + ...THRESHOLDS.map((threshold) => ({ + label: `${threshold}%`, + value: totalPageviews > 0 ? Math.round(((scrollCounts.get(threshold) ?? 0) / totalPageviews) * 100) : 0, + })), + ] return (