File tree Expand file tree Collapse file tree
docs/content/usage/widgets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,3 +26,5 @@ Note that key bindings are generally case-sensitive.
2626| Binding | Action |
2727| ------------ | -------------------------------------------------------------- |
2828| ++"Scroll"++ | Scrolling up or down zooms in or out of the graph respectively |
29+
30+ <!-- TODO: Add screenshots of widgets -->
Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ pub struct TimeSeriesData {
6262 pub gpu_mem : HashMap < String , Values > ,
6363
6464 /// Temperature data.
65+ ///
66+ /// TODO: Maybe make this use TypedTemperature?
6567 pub temperature : HashMap < String , ChunkedData < f32 > > ,
6668}
6769
File renamed without changes.
Original file line number Diff line number Diff line change @@ -34,21 +34,15 @@ pub struct TimeseriesState {
3434}
3535
3636impl TimeseriesState {
37- /// Create a new [`TimeseriesState`] using the given config.
38- pub fn new ( config : TimeseriesConfig ) -> Self {
37+ /// Create a new [`TimeseriesState`] using the given config and `autohide_timer` setting .
38+ pub fn new ( config : TimeseriesConfig , autohide_timer : Option < Instant > ) -> Self {
3939 Self {
4040 current_display_time : config. default_time_value ,
4141 config,
42- autohide_timer : None ,
42+ autohide_timer,
4343 }
4444 }
4545
46- /// Set the autohide timer.
47- pub fn with_autohide_timer ( mut self , autohide_timer : Option < Instant > ) -> Self {
48- self . autohide_timer = autohide_timer;
49- self
50- }
51-
5246 /// Get a mutable reference to the autohide timer.
5347 pub fn autohide_timer_mut ( & mut self ) -> & mut Option < Instant > {
5448 & mut self . autohide_timer
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ pub struct AutoYAxisTimeGraph {
9999impl AutoYAxisTimeGraph {
100100 pub ( crate ) fn new ( config : TimeseriesConfig , autohide_timer : Option < Instant > ) -> Self {
101101 AutoYAxisTimeGraph {
102- state : TimeseriesState :: new ( config) . with_autohide_timer ( autohide_timer) ,
102+ state : TimeseriesState :: new ( config, autohide_timer) ,
103103 height_cache : GraphHeightCache :: default ( ) ,
104104 }
105105 }
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ use super::{
77} ;
88
99/// A time series graph that expects data to be in a percentage format,
10- /// from 0.0 to 100.0 .
10+ /// from 0% to 100% .
1111pub struct PercentTimeGraph {
1212 state : TimeseriesState ,
1313}
1414
1515impl PercentTimeGraph {
1616 pub ( crate ) fn new ( config : TimeseriesConfig , autohide_timer : Option < Instant > ) -> Self {
1717 PercentTimeGraph {
18- state : TimeseriesState :: new ( config) . with_autohide_timer ( autohide_timer) ,
18+ state : TimeseriesState :: new ( config, autohide_timer) ,
1919 }
2020 }
2121
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ pub(crate) struct GeneralConfig {
5353 pub ( crate ) disable_click : Option < bool > ,
5454 pub ( crate ) disable_keys : Option < bool > ,
5555 pub ( crate ) no_write : Option < bool > ,
56- pub ( crate ) network_legend : Option < String > ,
56+ pub ( crate ) network_legend : Option < String > , // TODO: Migrate this to per-widget config
5757 pub ( crate ) memory_legend : Option < String > ,
5858 pub ( crate ) process_memory_as_value : Option < bool > ,
5959 pub ( crate ) tree : Option < bool > ,
You can’t perform that action at this time.
0 commit comments