Skip to content

Commit

Permalink
style(pictorialBar): make pxSign logic more intuitive
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart authored Dec 4, 2024
1 parent 5a1be94 commit 6e9ef3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chart/bar/PictorialBarView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function prepareBarLength(
// and when borderWidth be settled, the actual linewidth will be NaN
const isXAxis = valueDim.xy === 'x';
const isInverse = valueAxis.inverse;
outputSymbolMeta.pxSign = (isXAxis && !isInverse || !isXAxis && isInverse)
outputSymbolMeta.pxSign = (isXAxis && !isInverse) || (!isXAxis && isInverse)
? boundingLength >= 0 ? 1 : -1
: boundingLength > 0 ? 1 : -1;
}
Expand Down

0 comments on commit 6e9ef3b

Please sign in to comment.