use std::time::Instant;
use crate::{
components::time_series::{AutoYAxisTimeGraph, TimeseriesConfig},
options::config::disk_io_graph::DiskGraphLegend,
};
pub struct DiskIoGraphWidgetState {
pub graph: AutoYAxisTimeGraph,
pub show_read: bool,
pub show_write: bool,
pub legend: DiskGraphLegend,
pub use_log: bool,
}
impl DiskIoGraphWidgetState {
pub fn new(
config: TimeseriesConfig, autohide_timer: Option<Instant>, show_read: bool,
show_write: bool, legend: DiskGraphLegend, use_log: bool,
) -> Self {
Self {
graph: AutoYAxisTimeGraph::new(config, autohide_timer),
show_read,
show_write,
legend,
use_log,
}
}
}