Skip to content

Commit

Permalink
fix(pictorialBar): symbol should not flip with zero data apache#20260
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia authored and Carsten Paeth committed Sep 30, 2024
1 parent 1124928 commit c71d416
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/chart/bar/PictorialBarView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c71d416

Please sign in to comment.