From 04bfaf976b2edf67ae01ebd57702ae4f135eceaa Mon Sep 17 00:00:00 2001 From: Devit <39530469+DevitX@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:16:22 +0100 Subject: [PATCH 1/8] fix(BarView): borderColor hides bar color with large data. close #18185 --- src/chart/bar/BarView.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts index 54cc6ec72e..48089e7101 100644 --- a/src/chart/bar/BarView.ts +++ b/src/chart/bar/BarView.ts @@ -1176,7 +1176,8 @@ function createLarge( el.barWidth = barWidth; group.add(el); el.useStyle(data.getVisual('style')); - + // Reset stroke color + el.style.stroke = null; // Enable tooltip and user mouse/touch event handlers. getECData(el).seriesIndex = seriesModel.seriesIndex; From c66c50317a7d1944ee34c5a72cf964e933da0480 Mon Sep 17 00:00:00 2001 From: Devit <39530469+DevitX@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:56:02 +0100 Subject: [PATCH 2/8] test(candlestick): add test case for candlestick volume bars with borderColor --- test/candlestick-large-bar-border-color | 356 ++++++++++++++++++++++++ 1 file changed, 356 insertions(+) create mode 100644 test/candlestick-large-bar-border-color diff --git a/test/candlestick-large-bar-border-color b/test/candlestick-large-bar-border-color new file mode 100644 index 0000000000..b0d8ae3b0e --- /dev/null +++ b/test/candlestick-large-bar-border-color @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + From 904ce4909ec09c75c3dd88341236df5722c089d1 Mon Sep 17 00:00:00 2001 From: Devit <39530469+DevitX@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:08:46 +0100 Subject: [PATCH 3/8] fix(Bar): updated with reviewed changes --- src/chart/bar/BarView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts index 48089e7101..b8745d2021 100644 --- a/src/chart/bar/BarView.ts +++ b/src/chart/bar/BarView.ts @@ -1176,8 +1176,8 @@ function createLarge( el.barWidth = barWidth; group.add(el); el.useStyle(data.getVisual('style')); - // Reset stroke color - el.style.stroke = null; + // Stroke is rendered first to avoid overlapping with fill + el.style.strokeFirst = true; // Enable tooltip and user mouse/touch event handlers. getECData(el).seriesIndex = seriesModel.seriesIndex; From 4d1a5705084857a351f95590cd39c207a357ab4d Mon Sep 17 00:00:00 2001 From: Devit <39530469+DevitX@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:11:57 +0100 Subject: [PATCH 4/8] test(bar): changed test case for dense bars with border and fill color --- test/candlestick-large-bar-border-color | 367 +++++------------------- 1 file changed, 65 insertions(+), 302 deletions(-) diff --git a/test/candlestick-large-bar-border-color b/test/candlestick-large-bar-border-color index b0d8ae3b0e..7e44e5d4d5 100644 --- a/test/candlestick-large-bar-border-color +++ b/test/candlestick-large-bar-border-color @@ -20,337 +20,100 @@ under the License. - - - - - - - - - - - - - - - -
-
-
- - - - - - + + + + + + + + + + + +
+
+
+ + - - + + - From 4d452fdedb0c53ca9a3f668d3f954a46e0b3f0ca Mon Sep 17 00:00:00 2001 From: Devit <39530469+DevitX@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:24:32 +0100 Subject: [PATCH 5/8] test(bar): rename file and updated title --- ...estick-large-bar-border-color => bar-large-border-fill.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename test/candlestick-large-bar-border-color => bar-large-border-fill.html (95%) diff --git a/test/candlestick-large-bar-border-color b/bar-large-border-fill.html similarity index 95% rename from test/candlestick-large-bar-border-color rename to bar-large-border-fill.html index 7e44e5d4d5..b6463ca20c 100644 --- a/test/candlestick-large-bar-border-color +++ b/bar-large-border-fill.html @@ -104,7 +104,8 @@ var panel = document.getElementById('panel0'); var chart = testHelper.create(echarts, 'main0', { title: [ - 'Check if stroke and border are correcly rendered on dense data', + 'Bar chart border and color', + 'Check if **stroke and border** are correcly rendered on **dense** data', ], option: option, height: 550 From 9e4ff9f1a76f5f0eb093a3e8580d2a8ebff4a678 Mon Sep 17 00:00:00 2001 From: DevitX Date: Wed, 6 Nov 2024 20:40:13 +0100 Subject: [PATCH 6/8] test(bar): fix path --- test/bar-large-border-fill.html | 120 ++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 test/bar-large-border-fill.html diff --git a/test/bar-large-border-fill.html b/test/bar-large-border-fill.html new file mode 100644 index 0000000000..b6463ca20c --- /dev/null +++ b/test/bar-large-border-fill.html @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + From 965a7f32b822a2ce931245a9a24361cd801798bc Mon Sep 17 00:00:00 2001 From: DevitX Date: Wed, 6 Nov 2024 20:47:46 +0100 Subject: [PATCH 7/8] test(bar): changed path of test --- bar-large-border-fill.html | 120 ------------------------------------- 1 file changed, 120 deletions(-) delete mode 100644 bar-large-border-fill.html diff --git a/bar-large-border-fill.html b/bar-large-border-fill.html deleted file mode 100644 index b6463ca20c..0000000000 --- a/bar-large-border-fill.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - - From 47e5928d2e98bef9dc54690d122052307eb2d951 Mon Sep 17 00:00:00 2001 From: Devit <39530469+DevitX@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:03:13 +0100 Subject: [PATCH 8/8] fix(Bar): revert the strokeFirst to stroke null following the reviewed changes --- src/chart/bar/BarView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts index b8745d2021..a34cc153a0 100644 --- a/src/chart/bar/BarView.ts +++ b/src/chart/bar/BarView.ts @@ -1177,7 +1177,7 @@ function createLarge( group.add(el); el.useStyle(data.getVisual('style')); // Stroke is rendered first to avoid overlapping with fill - el.style.strokeFirst = true; + el.style.stroke = null; // Enable tooltip and user mouse/touch event handlers. getECData(el).seriesIndex = seriesModel.seriesIndex;