diff --git a/src/utils.ts b/src/utils.ts index e64640f..7be5c55 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -85,6 +85,12 @@ export const createNewPath = ({ return d3 .area() .x((d) => x(d.dateObj)) + .x0((d, index) => { + if (index === 0) { + return x(d.dateObj) - 2; + } + return x(d.dateObj); + }) .y0(svgHeight + 10) .y1((d) => y(d.y)); }