MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / remove_series

Method remove_series

src/plot_widget.rs:201–209  ·  view source on GitHub ↗

Remove a data series from the plot by its ID.

(&mut self, id: &ShapeId)

Source from the content-addressed store, hash-verified

199 self.data_version = self.data_version.wrapping_add(1);
200 }
201
202 /// Set a style function for the plot widget.
203 pub fn set_style<F>(&mut self, style: F)
204 where
205 F: Fn(&Theme) -> PlotStyle + Send + Sync + 'static,
206 {
207 self.style = Arc::new(style);
208 }
209
210 /// Remove a data series from the plot by its ID.
211 pub fn remove_series(&mut self, id: &ShapeId) -> Result<(), SeriesError> {
212 if self.series.shift_remove(id).is_some() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected