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

Method view_tooltip_overlay

src/plot_widget.rs:978–1022  ·  view source on GitHub ↗
(
        &'a self,
        payload: &'a Option<TooltipUiPayload>,
        camera_bounds: &Option<(Camera, Rectangle)>,
    )

Source from the content-addressed store, hash-verified

976 marker_style.marker_type as u32
977 } else {
978 u32::MAX
979 };
980 out.push(LegendEntry {
981 id: *id,
982 label: label.clone(),
983 color: s.color,
984 _marker: marker,
985 _line_style: s.line_style,
986 hidden: self.hidden_shapes.contains(id),
987 });
988 }
989 }
990 }
991 // Add vertical reference lines to legend
992 for (id, vline) in &self.vlines {
993 if let Some(ref label) = vline.label
994 && !label.is_empty()
995 {
996 out.push(LegendEntry {
997 id: *id,
998 label: label.clone(),
999 color: vline.color,
1000 _marker: u32::MAX,
1001 _line_style: Some(vline.line_style),
1002 hidden: self.hidden_shapes.contains(id),
1003 });
1004 }
1005 }
1006 // Add horizontal reference lines to legend
1007 for (id, hline) in &self.hlines {
1008 if let Some(ref label) = hline.label
1009 && !label.is_empty()
1010 {
1011 out.push(LegendEntry {
1012 id: *id,
1013 label: label.clone(),
1014 color: hline.color,
1015 _marker: u32::MAX,
1016 _line_style: Some(hline.line_style),
1017 hidden: self.hidden_shapes.contains(id),
1018 });
1019 }
1020 }
1021 // Add fills to legend
1022 for (id, fill) in &self.fills {
1023 if let Some(ref label) = fill.label
1024 && !label.is_empty()
1025 {

Callers 1

Calls 3

positioned_overlayFunction · 0.85
sizeMethod · 0.80
update_styleMethod · 0.80

Tested by

no test coverage detected