Bar chart: Fix stacking bug when data produces 0 accumulators (#51450)

* Don't divide by 0 ...

* Add test panel to gdev dashboard
This commit is contained in:
Dominik Prokop
2022-06-28 16:21:18 +02:00
committed by GitHub
parent f047f7dcf6
commit daf0e3cb4e
4 changed files with 103 additions and 14 deletions

View File

@@ -286,7 +286,7 @@ export function preparePlotData2(
if (v != null) {
// v / accum will always be pos, so properly (re)sign by group stacking dir
stacked[i] = group.dir * (v / accum[i]);
stacked[i] = accum[i] === 0 ? 0 : group.dir * (v / accum[i]);
}
}
}