mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user