studio icon indicating copy to clipboard operation
studio copied to clipboard

Preserve per-panel vertical zoom behavior on synced plots

Open foxymiles opened this issue 2 years ago • 0 comments

User-Facing Changes Preserve per-panel vertical zoom behavior on synced plots.

Description Change ChartJSManager to respect and not change existing, user manipulated Y scales except in two cases:

  1. When an explicit Y min/max are specified in settings those take precedence.
  2. When we pass an explicit resetBounds flag in the update message.

The second case is necessary because a Y min/max of undefined is currently interpreted as an intention to let the chart determine its own bounds based on the dataset but this has the side effect of clearing any change in the Y scale the user has initiated directly, so we want to avoid this unless the user has clicked the "reset view" button, which we currently interpret as a temporary absence of global bounds.

This is a somewhat inelegant solution but I haven't been able to come up with a better one that doesn't require refactoring the communication channel between the plot panel and the ChartJSManager to be more explicit about why particular x/y scales are being specified.

https://user-images.githubusercontent.com/93935560/194870062-2b7d7123-2422-400e-aa35-fc99fd4fb25e.mov

Fixes #4351

foxymiles avatar Oct 10 '22 12:10 foxymiles