diff --git a/ezgui/src/widgets/plot.rs b/ezgui/src/widgets/plot.rs index 24d54ec7ea..c64c454f7a 100644 --- a/ezgui/src/widgets/plot.rs +++ b/ezgui/src/widgets/plot.rs @@ -1,5 +1,5 @@ use crate::{ - Color, Drawable, EventCtx, GeomBatch, GfxCtx, Line, Outcome, ScreenDims, ScreenPt, + Checkbox, Color, Drawable, EventCtx, GeomBatch, GfxCtx, Line, Outcome, ScreenDims, ScreenPt, ScreenRectangle, Text, TextExt, Widget, WidgetImpl, }; use abstutil::prettyprint_usize; @@ -7,7 +7,8 @@ use geom::{Angle, Bounds, Circle, Distance, Duration, FindClosest, PolyLine, Pt2 // The X is always time pub struct Plot> { - draw: Drawable, + series: Vec, + draw_grid: Drawable, // The geometry here is in screen-space. max_x: Time, @@ -18,6 +19,12 @@ pub struct Plot> { dims: ScreenDims, } +struct SeriesState { + label: String, + enabled: bool, + draw: Drawable, +} + pub struct PlotOptions { pub max_x: Option