This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a commit to branch fix-pictorial-zero
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit fd51f71d88344533934f2061167169f973231b4a
Author: Ovilia <[email protected]>
AuthorDate: Wed Aug 28 14:41:09 2024 +0800

    fix(pictorialBar): symbol should not flip with zero data #20260
---
 src/chart/bar/PictorialBarView.ts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/chart/bar/PictorialBarView.ts 
b/src/chart/bar/PictorialBarView.ts
index c9460daac..196ab078f 100644
--- a/src/chart/bar/PictorialBarView.ts
+++ b/src/chart/bar/PictorialBarView.ts
@@ -278,6 +278,7 @@ function getSymbolMeta(
         hoverScale: isAnimationEnabled && itemModel.get(['emphasis', 'scale']),
         z2: itemModel.getShallow('z', true) || 0
     } as SymbolMeta;
+    console.log(symbolMeta)
 
     prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta);
 
@@ -341,7 +342,7 @@ function prepareBarLength(
 
     // if 'pxSign' means sign of pixel,  it can't be zero, or symbolScale will 
be zero
     // and when borderWidth be settled, the actual linewidth will be NaN
-    outputSymbolMeta.pxSign = boundingLength > 0 ? 1 : -1;
+    outputSymbolMeta.pxSign = boundingLength >= 0 ? 1 : -1;
 }
 
 function convertToCoordOnAxis(axis: Axis2D, value: number) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to