diff --git a/ui.go b/ui.go index d240d86..b7e6dfe 100644 --- a/ui.go +++ b/ui.go @@ -129,8 +129,10 @@ func (ui *UI) updateNetstats(sparklineIndex int, data []float64) { direction = "Tx" } - total := data[last] - current := total - data[last-1] + baseline := data[0] + total := data[last] - baseline + prev := data[last-1] - baseline + current := total - prev if current > *max { *max = current }