silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
189 stars 19 forks source link

Add X axis display size changes using Domain widget in line vis #1683

Open Pasarus opened 3 months ago

Pasarus commented 3 months ago

Is your feature request related to a problem?

Yes, users are requesting the ability to "hide" (outside of zooming differently) some amount of the X axis, typically this is achieved by adjusting how much of the axis is shown, using something similar to the domain widget found in the line vis but for both of the axis not just Y.

Specifically, we have data that has a significantly higher Y value than the rest of the more useful data, if we excluded say the first 20 entries in the .nxs file on the X-axis, we could trivially see the rest of the data. This is not a one-off used feature, and will be a frequently used feature for looking at this data.

Requested solution or feature

Either a toggle in the domain widget itself to switch between which axis it is adjusting, or another domain widget next to it, with both appropriately named x and y for their respective axis.

Alternatives you've considered

Zooming in, this is unintuitive to less technically inclined users. Just using the Y-axis domain and looking at the part that matters, we are looking at data that has an extremely stark elastic peak near the start of the data and we only care about everything after the peak this is not easy to view using just the Y-axis.

Additional context

Peak near the start: image

Data after adjusting the Y-Axis using the domain widget to get 90% of the way there (notice the peak at the start : image

If you need any more information let me know I am happy to discuss.

axelboc commented 3 months ago

Hi @Pasarus, thanks for getting in touch.

When you talk about zooming, have you tried our X-axis zoom feature? The shortcut should be Ctrl+Alt+Drag (or Ctrl+Alt+Wheel).

I grant you that even axial zooming is not as convenient as having a dedicated domain slider for the X axis, but I have to admit that I'm not super keen on adding an extra slider to the toolbar (or complexifying the existing slider tooltip). I also realise that with a slider, the X domain would persist across datasets, but note that we're hoping to make the zoom persistent as well at some point (cf. #1572).

loichuder commented 3 months ago

Also, we did develop a Select to zoom feature that is quite useful when one wants to zoom on a specific area of the curve (say a peak).

By holding Ctrl, you can drag a rectangle around the area you want to zoom in.