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

Method clear_hover

src/plot_widget.rs:495–499  ·  view source on GitHub ↗

Clear all hover points from the plot.

(&mut self)

Source from the content-addressed store, hash-verified

493 nearest_point
494 }
495
496 /// Find the nearest point to a given y-coordinate in the plot.
497 pub fn nearest_point_vertical(&self, series_id: ShapeId, y: f64) -> Option<PointId> {
498 let series = self.series.get(&series_id)?;
499 let mut min_distance = f64::INFINITY;
500 let mut nearest_point = None;
501 for (i, position) in series.positions.iter().enumerate() {
502 let distance = (position[1] - y).abs();

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected