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

Method update_series

src/plot_widget.rs:223–235  ·  view source on GitHub ↗

Update a data series by its id.

(
        &mut self,
        id: &ShapeId,
        mut f: F,
    )

Source from the content-addressed store, hash-verified

221 /// Remove a fill from the plot by its ID.
222 pub fn remove_fill(&mut self, id: &ShapeId) -> Result<(), SeriesError> {
223 if self.fills.shift_remove(id).is_some() {
224 self.hidden_shapes.remove(id);
225 self.data_version += 1;
226 Ok(())
227 } else {
228 Err(SeriesError::NotFound(*id))
229 }
230 }
231
232 /// Update a data series by its id.
233 pub fn update_series<F: FnMut(&mut Series)>(
234 &mut self,
235 id: &ShapeId,
236 mut f: F,
237 ) -> Result<(), SeriesError> {
238 if let Some(series) = self.series.get_mut(id) {

Callers 1

updateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected