From 369cb035030124e0c1fe2c74a882781c0e90a556 Mon Sep 17 00:00:00 2001 From: fandi-1205 <141796004+fandi-1205@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:29:41 +0800 Subject: [PATCH] fix(custom): grid area clipping in custom series #19993 (#20043) --- .../helper/createClipPathFromCoordSys.ts | 2 +- test/clip-custom.html | 127 ++++++++++++++++++ 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 test/clip-custom.html diff --git a/src/chart/helper/createClipPathFromCoordSys.ts b/src/chart/helper/createClipPathFromCoordSys.ts index 74ec7f8e90..191ac95c62 100644 --- a/src/chart/helper/createClipPathFromCoordSys.ts +++ b/src/chart/helper/createClipPathFromCoordSys.ts @@ -43,7 +43,7 @@ function createGridClipPath( let width = rect.width; let height = rect.height; - const lineWidth = seriesModel.get(['lineStyle', 'width']) || 2; + const lineWidth = seriesModel.get(['lineStyle', 'width']) || 0; // Expand the clip path a bit to avoid the border is clipped and looks thinner x -= lineWidth / 2; y -= lineWidth / 2; diff --git a/test/clip-custom.html b/test/clip-custom.html new file mode 100644 index 0000000000..3e32aab73a --- /dev/null +++ b/test/clip-custom.html @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + \ No newline at end of file