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

Method hover_highlight_provider

examples/three_plots.rs:234–243  ·  view source on GitHub ↗
(ctx: TooltipContext, point: &mut HighlightPoint)

Source from the content-addressed store, hash-verified

232 }
233 }
234 fn hover_highlight_provider(ctx: TooltipContext, point: &mut HighlightPoint) -> Option<String> {
235 if point.marker_style.is_none() {
236 // set plot 1 to star in hover highlight
237 point.marker_style = Some(MarkerStyle::square(6.0));
238 }
239 Some(format!(
240 "Index: {}\nX: {:.2}\nY: {:.2}",
241 ctx.point_index, point.x, point.y
242 ))
243 }
244 fn pick_highlight_provider(ctx: TooltipContext, point: &mut HighlightPoint) -> Option<String> {
245 if point.marker_style.is_none() {
246 // set plot 1 to star in pick highlight

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected