Skip to content

Commit

Permalink
Merge pull request #20276 from kingyue737/patch-1
Browse files Browse the repository at this point in the history
fix(gauge): fix z2 is negative when maxVal is negative
  • Loading branch information
Ovilia authored Aug 26, 2024
2 parents 7955a46 + 88345fe commit 52e4006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chart/gauge/GaugeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class GaugeView extends ChartView {
r: r
}
});
isOverlap && (progress.z2 = maxVal - (data.get(valueDim, idx) as number) % maxVal);
isOverlap && (progress.z2 = linearMap(data.get(valueDim, idx) as number, [minVal, maxVal], [100, 0], true));
return progress;
}

Expand Down

0 comments on commit 52e4006

Please sign in to comment.