this is used for scaling the graph, and if we do not clamp then a
idleing guest that produces cpu load noise < 0.001 looks like there's
a lot going on, as its scaled the same as when there's intertia
changes going on with an actual relevant load level.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
paint.strokeWidth = 1;
var path = Path();
- final globalMaxima = data!.map((e) => e.y).reduce((a, b) => max(a, b));
+ final globalMaxima = max(
+ data!.map((e) => e.y).reduce((a, b) => max(a, b)),
+ 0.001, // avoid that almost zero usage looks like a high load
+ );
final points = convertDataToPoints(data!, size, staticMax ?? globalMaxima);
points.asMap().forEach((i, el) {
if (i == 0) {