Skip to content

Commit

Permalink
Add view properties to choose group by (entity or time) and sort orde…
Browse files Browse the repository at this point in the history
…r (asc vs desc)
  • Loading branch information
abey79 committed Jul 12, 2024
1 parent 1a3e035 commit c088a37
Show file tree
Hide file tree
Showing 34 changed files with 1,374 additions and 37 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4904,10 +4904,13 @@ dependencies = [
"re_entity_db",
"re_log_types",
"re_renderer",
"re_space_view",
"re_tracing",
"re_types",
"re_types_core",
"re_ui",
"re_viewer_context",
"re_viewport_blueprint",
]

[[package]]
Expand Down
3 changes: 3 additions & 0 deletions crates/store/re_types/definitions/rerun/blueprint.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ include "./blueprint/components/panel_state.fbs";
include "./blueprint/components/query_expression.fbs";
include "./blueprint/components/root_container.fbs";
include "./blueprint/components/row_share.fbs";
include "./blueprint/components/sort_order.fbs";
include "./blueprint/components/space_view_class.fbs";
include "./blueprint/components/space_view_maximized.fbs";
include "./blueprint/components/space_view_origin.fbs";
include "./blueprint/components/table_group_by.fbs";
include "./blueprint/components/tensor_dimension_index_slider.fbs";
include "./blueprint/components/view_fit.fbs";
include "./blueprint/components/viewer_recommendation_hash.fbs";
Expand All @@ -41,6 +43,7 @@ include "./blueprint/archetypes/visible_time_ranges.fbs";
include "./blueprint/archetypes/visual_bounds2d.fbs";

include "./blueprint/archetypes/plot_legend.fbs";
include "./blueprint/archetypes/range_table_settings.fbs";
include "./blueprint/archetypes/scalar_axis.fbs";

include "./blueprint/views/bar_chart.fbs";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
include "arrow/attributes.fbs";
include "python/attributes.fbs";
include "rust/attributes.fbs";

include "rerun/attributes.fbs";

namespace rerun.blueprint.archetypes;


/// Configuration for the sorting of the rows of a time range table.
table TableRowOrder (
"attr.rerun.scope": "blueprint",
"attr.rust.derive": "Copy",
"attr.rust.generate_field_info"
) {
// --- Optional ---

/// The type of the background.
group_by: rerun.blueprint.components.TableGroupBy ("attr.rerun.component_optional", nullable, order: 1000);

/// Color used for the `SolidColor` background type.
sort_order: rerun.blueprint.components.SortOrder ("attr.rerun.component_optional", nullable, order: 2000);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include "arrow/attributes.fbs";
include "python/attributes.fbs";
include "rust/attributes.fbs";

include "rerun/datatypes.fbs";
include "rerun/attributes.fbs";

namespace rerun.blueprint.components;


/// Sort order for data table.
enum SortOrder: byte (
"attr.rerun.scope": "blueprint"
) {
/// Ascending
Ascending (default),

/// Descending
Descending,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include "arrow/attributes.fbs";
include "python/attributes.fbs";
include "rust/attributes.fbs";

include "rerun/datatypes.fbs";
include "rerun/attributes.fbs";

namespace rerun.blueprint.components;


/// Primary element by which to group by in a temporal data table.
enum TableGroupBy: byte (
"attr.rerun.scope": "blueprint"
) {
/// Group by entity.
Entity (default),

/// Group by instance.
Time,
}

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

2 changes: 2 additions & 0 deletions crates/store/re_types/src/blueprint/archetypes/mod.rs

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

201 changes: 201 additions & 0 deletions crates/store/re_types/src/blueprint/archetypes/table_row_order.rs

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

2 changes: 2 additions & 0 deletions crates/store/re_types/src/blueprint/components/.gitattributes

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

4 changes: 4 additions & 0 deletions crates/store/re_types/src/blueprint/components/mod.rs

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

Loading

0 comments on commit c088a37

Please sign in to comment.