diff --git a/app-proto/src/diagnostics.rs b/app-proto/src/diagnostics.rs index b90989f..d283c51 100644 --- a/app-proto/src/diagnostics.rs +++ b/app-proto/src/diagnostics.rs @@ -1,7 +1,7 @@ use charming::{ Chart, WasmRenderer, - component::{Axis, Grid}, + component::{Axis, DataZoom, Grid}, element::AxisType, series::{Line, Scatter}, }; @@ -91,9 +91,10 @@ fn LossHistory() -> View { } let chart = Chart::new() .animation(false) + .data_zoom(DataZoom::new().y_axis_index(0).right(40).start(0).end(100)) .x_axis(step_axis) .y_axis(scaled_loss_axis) - .grid(Grid::new().top(20).right(40).bottom(30).left(60)) + .grid(Grid::new().top(20).right(80).bottom(30).left(60)) .series(scaled_loss_series); renderer.render(CONTAINER_ID, &chart).unwrap(); }); @@ -143,9 +144,10 @@ fn SpectrumHistory() -> View { } let chart = Chart::new() .animation(false) + .data_zoom(DataZoom::new().y_axis_index(0).right(40).start(0).end(100)) .x_axis(step_axis) .y_axis(eigval_axis) - .grid(Grid::new().top(20).right(40).bottom(30).left(60)) + .grid(Grid::new().top(20).right(80).bottom(30).left(60)) .series(eigval_series); renderer.render(CONTAINER_ID, &chart).unwrap(); });