Scale integer counts on the panel like every other figure

This commit is contained in:
flamingcow
2026-08-04 11:27:35 -07:00
parent 49a1a2f829
commit 21b20d0071
2 changed files with 14 additions and 3 deletions
+3 -3
View File
@@ -303,7 +303,7 @@ func (d *display) errCounts(x, w, y int, e errs) int {
n := r.get(e)
c := errColor(n)
cx, cw, cy := d.chipAt(i, x, w, y, d.countChipH(), c)
ty := d.centerIn(d.gridB, cx, cw, cy+chipPadY, commas(n), c)
ty := d.centerIn(d.gridB, cx, cw, cy+chipPadY, scaleCount(n), c)
d.centerIn(d.grid, cx, cw, ty, r.label, c)
}
return y + d.countsH()
@@ -343,8 +343,8 @@ func (d *display) render(v view, elapsed time.Duration, cable string) error {
x, w = d.panel(d.sincePanel, v.since)
d.stats(d.gridB, x, w, d.sinceYs[0], []statCell{
{scaleTime(elapsed), "elapsed", uiFg},
{scaleSI(float64(v.rxFrames)), "packets", uiFg},
{scaleSI(float64(v.rxGot)), "bytes", uiFg},
{scaleCount(v.rxFrames), "packets", uiFg},
{scaleCount(v.rxGot), "bytes", uiFg},
{cable, "m", uiFg},
})
d.errCounts(x, w, d.sinceYs[1], v.since)