We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a06153 commit 589c91fCopy full SHA for 589c91f
src/ui/widgets/Tank/tank.tsx
@@ -57,8 +57,10 @@ export const TankComponent = (
57
}
58
const numValue = value?.getDoubleValue() ?? 0;
59
const percentCalc = logScale
60
- ? ((Math.log10(numValue) - Math.log10(minimum)) * 100) /
61
- (Math.log10(maximum) - Math.log10(minimum))
+ ? minimum === 0
+ ? (Math.log10(numValue) * 100) / Math.log10(maximum)
62
+ : ((Math.log10(numValue) - Math.log10(minimum)) * 100) /
63
+ (Math.log10(maximum) - Math.log10(minimum))
64
: ((numValue - minimum) * 100) / (maximum - minimum);
65
66
const percent =
0 commit comments