egui/crates
jayzhudev e13cc69d76
Add a public API for overriding plot legend traces' visibilities (#3534)
Added a public API in `egui_plot -> legend` to allow `hidden_items` to
be overridden in the plot legend widget. This allows convenient control
of traces' visibilities the selection of traces from the application
code.

### Example
```rust
    let legend_config = if plot_selection_changed {
        let hidden_items = match plot_selection {
            PlotSelection::SelectAll => Vec::new(),
            PlotSelection::DeselectAll => all_trace_names,
        };

        Legend::default()
            .position(Corner::RightTop)
            .hidden_items(hidden_items) // Overrides `hidden_items`
    } else {
        Legend::default().position(Corner::RightTop)
    };

    Plot::new(id)
        .legend(legend_config)
        .show(ui, draw_plot);
```

Closes <https://github.com/emilk/egui/issues/3533>.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2024-01-06 22:35:54 +01:00
..
ecolor Fix some clippy 1.75 lints (#3754) 2023-12-30 11:23:21 +01:00
eframe `eframe`: Fix building the `wasm32` docs for `docs.rs` (#3757) 2023-12-31 10:26:02 +01:00
egui Add indeterminate state to checkbox (#3605) 2024-01-06 22:34:23 +01:00
egui-wgpu Bump `winit` to `0.29.7` (#3753) 2024-01-02 07:27:52 +01:00
egui-winit Ignore extra SHIFT and ALT when matching modifiers (#3769) 2024-01-05 10:53:14 +01:00
egui_demo_app Fix some clippy 1.75 lints (#3754) 2023-12-30 11:23:21 +01:00
egui_demo_lib Add indeterminate state to checkbox (#3605) 2024-01-06 22:34:23 +01:00
egui_extras Implement table row selection and hover highlighting (#3347) 2024-01-06 18:10:34 +01:00
egui_glow Update to glow 0.13 (#3715) 2023-12-18 15:15:20 +01:00
egui_plot Add a public API for overriding plot legend traces' visibilities (#3534) 2024-01-06 22:35:54 +01:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Add a bunch of `#[inline]` 2023-12-18 17:28:47 +01:00
epaint Fix: allow using the full Private Use Area for custom fonts (#3509) 2024-01-06 22:33:08 +01:00