feature: Rework network y-axis, linear interpolation for off-screen data (#437)

Rewrite of the y-axis labeling and scaling for the network widget, along with more customization. This still has one step to be optimized (cache results so we don't have to recalculate the legend each time), but will be done in another PR for sake of this one being too large already.

Furthermore, this change adds linear interpolation at the 0 point in the case a data point shoots too far back - this seems to have lead to ugly gaps to the left of graphs in some cases, because the left hand limit was not big enough for the data point. We address this by grabbing values just outside the time range and linearly interpolating at the leftmost limit. This affects all graph widgets (CPU, mem, network).

This can be optimized, and will hopefully be prior to release in a separate change.
This commit is contained in:
Clement Tsang
2021-04-04 05:38:57 -04:00
committed by GitHub
parent 40f4c796f8
commit eb6a737d34
31 changed files with 1158 additions and 384 deletions
+2
View File
@@ -52,6 +52,8 @@ jobs:
override: true
components: clippy
# TODO: Can probably put cache here in the future; I'm worried if this will cause issues with clippy though since cargo check breaks it; maybe wait until 1.52, when fix lands.
- run: cargo clippy --all-targets --workspace -- -D warnings
# Compile/check test.