You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now you can have one without the other. Addresses #217
# Public API changes
The PlotItem label formatter is now optional:
```
-pub fn egui_plot::PlotItem::on_hover(&self, plot_area_response: &egui::response::Response, elem: egui_plot::ClosestElem, shapes: &mut alloc::vec::Vec<epaint::shapes::shape::Shape>, cursors: &mut alloc::vec::Vec<egui_plot::Cursor>, plot: &egui_plot::PlotConfig<'_>, label_formatter: &egui_plot::LabelFormatter<'_>)
+pub fn egui_plot::PlotItem::on_hover(&self, plot_area_response: &egui::response::Response, elem: egui_plot::ClosestElem, shapes: &mut alloc::vec::Vec<epaint::shapes::shape::Shape>, cursors: &mut alloc::vec::Vec<egui_plot::Cursor>, plot: &egui_plot::PlotConfig<'_>, label_formatter: &core::option::Option<egui_plot::LabelFormatter<'_>>)
```
Allow to specify crosshair:
```
+pub fn egui_plot::Plot<'a>::show_crosshair(self, show: bool) -> Self
+pub egui_plot::PlotConfig::show_crosshair: bool
```
Add default formatter:
```
+pub fn egui_plot::default_label_formatter(name: &str, value: &egui_plot::PlotPoint) -> alloc::string::String
```
And by default, labels are not shown. You have to enable it by passing
`label_formatter(you_label_formatter)`
You can use the `default_label_formatter`.
0 commit comments