Skip to content
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

Automatic scale the data of Y values to min/max visible X range. #315

Closed
raven2cz opened this issue Nov 17, 2020 · 1 comment
Closed

Automatic scale the data of Y values to min/max visible X range. #315

raven2cz opened this issue Nov 17, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@raven2cz
Copy link
Contributor

This functionality is based on the requirements for financial charts, see issue #294

In common, this is not just a financial chart feature; it is a reasonable behavior for chart where is necessary to research specific part of X range (mainly time range) and see whole compact information min-max of Y data values for this specific selected/slide X range (because Y min-max are very important to be visible; dangerous).

The feature is important mainly for:

  • the slider, that the specific X range is selected, the sliding window still kept min-max Y range.
  • arrow keys: Up, Down keys for zoom-in/out (still kept min-max, it is not standard zoomer!), and Left/Right key for sliding in time (see video for zooming and movement in the chart).
  • "double-click", automatically scale the data range of Y values to min/max,

Note: Standard zooming (standard zoomer) with mouse scroll wheel has to be kept, no change. It's very good feature, there is no restriction for min-max. If there is some problem to mixture of this features together? Usage of mouse scroll wheel DISABLE this feature, if you use RIGHT mouse button (which is already supported in zoomer) it's activate this feature again, because it has higher priority. In my point of view, the zoomer In/Out is activated for mouse wheel (only), but it is disabled if the right button is used, or another behavior has higher priority for Y-range restrictions. This is standard solution from any analytic software.

What I mean is presented in this amibroker youtube video from 1:24 for sliding, zooming etc. please look to this short video for understanding. There is not shown zoomer, but main requirement is visible.

Required chart features - example video from Amibroker >1:24

@RalphSteinhagen RalphSteinhagen added enhancement New feature or request help wanted Extra attention is needed labels Nov 17, 2020
@wirew0rm
Copy link
Member

Quick note on this, the ContourChartRenderer does this with its color axis, which can be set to automatically re-scale to the visible data range.
That case is a bit simpler as usually there is only one contour/heatmap plot per chart/axis, so renderers will not 'argue' about updating the axis range.
This might nevertheless help you implementing this or if you find a more general/elegant solution we should reuse that aproach over there as well.

As for the keybindings, application specific keybindings should probably be handled by the application.
The right click funtionality in the zoomer is handled in the ObservableDeque zoomStacks which is currently not exposed, you would need to integrate with this, probably by extending Zoomer.

@raven2cz raven2cz closed this as completed Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants