(
&'a self,
payload: &'a Option<TooltipUiPayload>,
camera_bounds: &Option<(Camera, Rectangle)>,
)
| 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 | { |
no test coverage detected