Fix line extension on the right side
This commit is contained in:
@@ -112,7 +112,7 @@ export const CanvasChart = ({ total, hueOffset = 0, domain, hardDomain, dataKey,
|
|||||||
ctx.lineTo(x, y);
|
ctx.lineTo(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.lineTo(width + xMargin, height - (height * (history.current.data[0][dataKey][i] ?? 0)) / max.current);
|
ctx.lineTo(width + xMargin, height - (height * (history.current.data.at(-1)?.[dataKey][i] ?? 0)) / max.current);
|
||||||
ctx.lineTo(width + xMargin, height);
|
ctx.lineTo(width + xMargin, height);
|
||||||
|
|
||||||
if (type === 'fill') ctx.fill();
|
if (type === 'fill') ctx.fill();
|
||||||
|
|||||||
Reference in New Issue
Block a user