diff options
Diffstat (limited to 'src/canvas/widgets/cpu_graph.rs')
-rw-r--r-- | src/canvas/widgets/cpu_graph.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/canvas/widgets/cpu_graph.rs b/src/canvas/widgets/cpu_graph.rs index bce8b699..e03c9032 100644 --- a/src/canvas/widgets/cpu_graph.rs +++ b/src/canvas/widgets/cpu_graph.rs @@ -220,7 +220,12 @@ impl CpuGraphWidget for Painter { self.colours.cpu_colour_styles[cpu_widget_state .scroll_state .current_scroll_position - % self.colours.cpu_colour_styles.len()] + - 1 // Because of the all position + - (if show_avg_cpu { + AVG_POSITION + } else { + 0 + }) % self.colours.cpu_colour_styles.len()] }) .data(&cpu.cpu_data[..]) .graph_type(tui::widgets::GraphType::Line)] |