-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuring time series plot time axis from blueprint #8050
Comments
Are things that are stored on the blueprint timeline indexed? If so, what happens when the user moved the plot at time t=1.0 manually and then had moved the plots manually at t=2.0? As a user, I want to see the plots stay the same as I prepared them at t=1.0 when having the time goes forward (e.g. I zoom onto a special part of a timeseriesplot), but if the setup changes at t=2.0, this is not what I want. |
Blueprint is stored in a separate store from the "regular" data store. We do use an index timeline there but it has no relationship with any of the time axis that are used in the data store. |
The TimeSeriesView can be configured to show the last e.g. 5 seconds of new data. This allows to update the time-axis as new data is arriving. What is causing this time-axis update today? Would the |
Right now egui_plot just auto focuses onto the queried data. It essentially just looks onto what lines/points/markers are in the plot view and snaps to that. That is until one scrolls around at which point it stores the time range in its internal state (note though that the y range == ScalarAxis is already reflected to the blueprint store). The configuration we already have on visible time range is strictly speaking just a query range to the datastore. Granted, for most usecases this is perfectly sufficient and I even had a prototype at some point where I tied the visible time range directly to what's on screen (I even found it again, maybe some of the patterns can be salvaged!). However, we decided to keep the query separate from the presentation. I.e. a camera movement (== scrolling around in the plot) should not change the query to the store (== "visible time range"), at least not by default. |
Thanks for the input @Wumpf .
There seems to be a typo somewhere here - it makes it sound the actual and desired shouldn't be the same, but it seems it is?
What do you mean by
Let me try to summaries things here to check I understand it:
At the moment the Looking at 1, it seems that each timeline can have a different My further understanding is this issue is about adding a way to manually update the 1/ In the future there might also be the case that changes to the 3/ At the moment, if the TimeSeriesView is in state 1/ or in state 2/ is only defined implicit. Practically, I think the only two supported cases should be 1/ and 3/, where there should be an explicit button / checkbox to switch between the two of them (if 2/ should be supported, what's the usecase for it?). Let's assume we add a new property on the In terms what needs to be implemented for this issue, here is what I think a) Add a new Does this work outline make sense? |
Should the What should happen in the cases 1/-3/ if the user zooms on the x-axis? My feeling is that in 1/ the |
Correct, typoed there! Fixed it. Today we show the data range rather than what's in visible time range
Technically called "fallback provider". Which is an internal mechanism to customize what value component value should be used & shown in the ui in a given context. See https://github.com/rerun-io/rerun/blob/main/crates/viewer/re_viewer_context/src/component_fallbacks.rs
well.. not quite. The problem is that egui_plot knows nothing about anything and just zooms in on supplied data.
yes and to persist the data in the first place.
No, the idea is that if "presented time-range" is fully independent. It just happens to source its default from visible time range.
Leaving out 3/ this doesn't need an extra property. It might be helpful for you to read up first how other properties are implemented and familiarize yourself with the system of how they typically work. I wish there was more good examples to pick from, we never quite got to build this out fully (illustrated by the fact that this ticket is open :/).
Ui for properties is semi automatic (there's util functions that reduce this quite a bit), so it should be easy... if it wasn't for the multi-timeline issue you identified, details below. Again, there should be no active switching other than a reset-to-default which is already part of the ui via the "..." menu on each property. Granted, this has a stronger effect than on most, so this might be special, but I'd rather have this be consistent and then later adjust how we handle this (this isn't the only case with a more complex fallback).
This is tricky or at least annoying indeed. The datastructure I sketched is too limited for this and probably this needs to be handled akin to how visible time range is handled. However, I'd leave it out of a first draft and just have this work for any timeline. I.e. if the property is there then its values are what's being used no matter what. Having this enabled on a per timeline basis makes all aspects of this feature a lot more complex and is unlikely to bring much user value I reckon.
Since I already excluded 3/ 😉 , zooming would just directly edit the |
I feel the more messages we sent back and forth, the more unsure I get what to do. If the user defines a TimeSeriesView like this:
What determines the value on the |
huh yeah this time zone delayed back and forth doesn't feel very effective, we're obviously at least partially talking past each other. Would you be okay with setting up a zoom (or similar) call? You can ping me on Discord at To the code example:
Hope I didn't mess up any of the details and this makes sense! |
Hi @Wumpf , I will reach out to you via Discord. Thanks for your outline above. I think what I called case 1/ and case 2/ correspond to the following:
^--- this looks like case 1/ in my definition
^--- this looks like case 2/ in my definition Is this correct? I assume we don't want to rely on the state in the egui_plot to determine if we are in 1/ or 2/. Then I don't see how we know during rendering if the view should follow 1/ or 2/. We could keep track if we are in 1/ or 2/ by changing |
Quoting what @Wumpf wrote before:
Keeping the viewed data range and queried data range in sync is what I would expect should happen by default. What is a use case where the queried and viewed data range should not match? |
In my application I have several non-synced local time frames that I need to view, so I need to set a different X (time) for each time series plot. However currently I can only set 1 global time and this corrupts all plots that does not use the global time. |
What do you mean you can set only 1 global time? |
@jviereck All time series plots use the "global time" (set in the dropdown on top of the timeline) as the X axis. However I want to use a different time as the X axis |
Currently the time axis plot is ephemeral state that lives entirely in
egui_plot
. I.e. users can not set it from blueprint api and any left/right scrolling that has been manually is not stored in the blueprint state, getting lost on restart.There is an "automatic" state that covers a lot of usecases already though: the time axis will adjust to the visible time range which determines the data that is queried. This should be the
fallback provider
for this property/component in this context!Note also, that this auto-behavior doesn't always work as desired today: egui_plot zooms in on the available data rather than a defined range. This means that if your visible time range goes from e.g. 100 to 500 but your data only starts at 200, then the shown range becomes 200 to 500 when it should actually be 100 to 500
Related to:
The text was updated successfully, but these errors were encountered: