studio
studio copied to clipboard
Add manual limits for x axis
User-Facing Changes This adds new plot panel settings to manually specify the min and max X axis values.
Description This adds new settings and new logic to clamp the X axis when both min and max are specified.
It also separates X & Y related settings into their own nodes in the settings sidebar.

Fixes #3991
Range
here for X axis seems a bit ambiguous. Maybe we should call it Follow range
?
Looks nice. @ljburtz FYI this was your request.
X axis settings currently seem pretty broken in this PR:
https://user-images.githubusercontent.com/637671/185045022-2f6592d2-5f07-4c90-a9be-861e70896928.mov
@foxymiles
Range
here for X axis seems a bit ambiguous. Maybe we should call itFollow range
?
It feels to me like maybe there are two modes - I don't know what to call them, but let's say "live" and "static".
Live mode is when x axis represents time, you are following the playhead, and you set a range
on how much time you want to see prior to your playhead.
- This should be the default for live data sources
Static mode (needs a better name) is when you see the entire window of time, and can set a min/max x axis values.
- This should be the default for historical data sources (is that even possible to change the default based on data source?)
- If you are using a live data source, this option is still available, e.g. if you want to accumulate all data since time=0.
This needs more thinking through, but I just wanted to put some thoughts out there.
X axis settings currently seem pretty broken in this PR:
I've fixed the toggle button and changed the logic to apply the min max if at least one of them is specified instead of requiring both.
How does the Range
setting interact with Min/Max
for the x-axis? It feels to me like we need a dropdown that lets you select whether to use the min/max
or the offset from current options to control time on the x-axis.
How does the
Range
setting interact withMin/Max
for the x-axis? It feels to me like we need a dropdown that lets you select whether to use themin/max
or the offset from current options to control time on the x-axis.
Currently setting one clears the other but yeah it might be better to make it explicit. I guess that will mean dirtying the layout if we add a new field to control that setting?
great to see the work happening for this feature, much appreciated.
to contribute to the thinking -> an important use case related to the xmin / xmax is when plotting using msg.accumulated as the x axis index (= sometimes the x axis is not time). might be good to test this use case during this xmin/xmax development.
also: these two use cases are relevant #3989 and #3990

The Range setting didn't have any effect on my plot. This is our sample dataset.
The Range setting didn't have any effect on my plot. This is our sample dataset.
Looks like we don't have a story covering that setup. I'll add one.