From b141a9158fe40cee56fd7b0dce531bd1d9318133 Mon Sep 17 00:00:00 2001 From: plouc Date: Wed, 1 May 2024 14:55:08 +0900 Subject: [PATCH] fix(bar): fix canvas grid lines not considering margin --- packages/bar/src/BarCanvas.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bar/src/BarCanvas.tsx b/packages/bar/src/BarCanvas.tsx index fefd2a04f..e884ee504 100644 --- a/packages/bar/src/BarCanvas.tsx +++ b/packages/bar/src/BarCanvas.tsx @@ -335,8 +335,8 @@ const InnerBarCanvas = ({ if (enableGridX) { renderGridLinesToCanvas(ctx, { - width, - height, + width: innerWidth, + height: innerHeight, scale: xScale, axis: 'x', values: gridXValues, @@ -345,8 +345,8 @@ const InnerBarCanvas = ({ if (enableGridY) { renderGridLinesToCanvas(ctx, { - width, - height, + width: innerWidth, + height: innerHeight, scale: yScale, axis: 'y', values: gridYValues,