Skip to content

Commit

Permalink
fix(pictorialBar): symbol should not flip with zero data #20260
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Aug 28, 2024
1 parent bc065fd commit fd51f71
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)

Check failure on line 281 in src/chart/bar/PictorialBarView.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Unexpected console statement

Check failure on line 281 in src/chart/bar/PictorialBarView.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Missing semicolon

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 fd51f71

Please sign in to comment.