Skip to content

Commit

Permalink
Plot series visibility separarate from entity visibility, handle mult…
Browse files Browse the repository at this point in the history
…i-series visibility (#9079)
  • Loading branch information
Wumpf authored Feb 20, 2025
1 parent d7dbb6f commit c3c27e2
Show file tree
Hide file tree
Showing 52 changed files with 874 additions and 95 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2166,7 +2166,7 @@ dependencies = [
[[package]]
name = "egui_plot"
version = "0.31.0"
source = "git+https://github.com/emilk/egui_plot.git?branch=main#99303b45554581163f022a8cf0b1a40e6fd3d333"
source = "git+https://github.com/emilk/egui_plot.git?branch=main#9ebfc9c400f8835255754e6a2edb52ea77fab8c7"
dependencies = [
"ahash",
"egui",
Expand Down Expand Up @@ -7114,6 +7114,7 @@ dependencies = [
"re_viewer_context",
"re_viewport",
"re_viewport_blueprint",
"smallvec",
]

[[package]]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ significant_drop_tightening = "allow" # An update of parking_lot made this trigg
# egui-wgpu = { path = "../../egui/crates/egui-wgpu" }
# emath = { path = "../../egui/crates/emath" }

egui_plot = { git = "https://github.com/emilk/egui_plot.git", branch = "main" } # 2025-02-18 - legend hover reports as hovered items
egui_plot = { git = "https://github.com/emilk/egui_plot.git", branch = "main" } # 2025-02-20 - everything is id identified, allowing for instance reading out hidden items reliable
# egui_plot = { path = "../../egui_plot/egui_plot" }

# egui_tiles = { git = "https://github.com/rerun-io/egui_tiles", branch = "emilk/update-egui" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ table SeriesLine (
/// Used in the legend.
name: rerun.components.Name ("attr.rerun.component_optional", nullable, order: 3000);

/// Which lines are visible.
///
/// If not set, all line series on this entity are visible.
/// Unlike with the regular visibility property of the entire entity, any series that is hidden
/// via this property will still be visible in the legend.
visible_series: [rerun.components.SeriesVisible] ("attr.rerun.component_optional", nullable, order: 3100);

/// Configures the zoom-dependent scalar aggregation.
///
/// This is done only if steps on the X axis go below a single pixel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ table SeriesPoint (
/// Used in the legend.
name: rerun.components.Name ("attr.rerun.component_optional", nullable, order: 3000);

/// Which point series are visible.
///
/// If not set, all point series on this entity are visible.
/// Unlike with the regular visibility property of the entire entity, any series that is hidden
/// via this property will still be visible in the legend.
visible_series: [rerun.components.SeriesVisible] ("attr.rerun.component_optional", nullable, order: 3100);

/// Size of the marker.
marker_size: rerun.components.MarkerSize ("attr.rerun.component_optional", nullable, order: 4000);
}
1 change: 1 addition & 0 deletions crates/store/re_types/definitions/rerun/components.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace rerun.components;

/// Like `Visible`, but for time series.
///
/// TODO(#6889): This is a temporary workaround. Right now we can't use `Visible` since it would conflict with the entity-wide visibility state.
struct SeriesVisible (
"attr.docs.unreleased", // this component got moved, links changed.
"attr.arrow.transparent",
"attr.python.aliases": "bool",
"attr.rust.derive": "Copy, PartialEq, Eq, PartialOrd, Ord",
"attr.rust.repr": "transparent",
"attr.rust.tuple_struct"
) {
visible: rerun.datatypes.Bool (order: 100);
}
60 changes: 56 additions & 4 deletions crates/store/re_types/src/archetypes/series_line.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c3c27e2

Please sign in to comment.