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

XYChart: mouse cursor behaviour associated with different X axis types #3419

Open
zoony opened this issue Apr 1, 2021 · 2 comments
Open
Labels

Comments

@zoony
Copy link

zoony commented Apr 1, 2021

Moving an unsnapped (or snapped) mouse cursor around an XYChart with a ValueAxis, DateAxis or a CategoryAxis as the x-axis.

Behaviour

  • Unsnapped cursor
    • X ValueAxis & X DateAxis
      • no y-value bubble displayed
    • X CategoryAxis
      • y-value Bubble displayed
  • Snapped cursor
    • y-value bubble displayed for each type of x-axis
    • X ValueAxis
      • in the demo case linked below the dataset used showed the following
        • cursor jumps between widely separated x values as mouse is moved in the x-direction. This is most noticeable at a constant y value close to the max & in the region of peaks in the data
        • zoom in far enough (e.g. using zoom in button) and the cursor snaps to all data points
    • X DateAxis & X CategoryAxis
      • cursor snaps to all x values at the full x-range (at least seems to)

Setup

  • A single series in an XYChart tested using each of the following axes combinations:
    • one Y ValueAxis & one X ValueAxis
    • one Y ValueAxis & one X DateAxis
    • one Y ValueAxis & one X CategoryAxis

Notes

  • I've set up a demo page comparing the 3 types of x-axes with the same dataset.
  • There is a checkbox to toggle cursor snapped status
    • Unsure of how to safely unsnap after snapping the mouse cursor
      • chart.cursor.snapToSeries = [] results in the two x-hairs lines not connecting anymore...

Demo page only

https://typescript-amchart-autoscale-on-zoom-27gvrz.stackblitz.io/

Demo source + output page

https://stackblitz.com/edit/typescript-amchart-autoscale-on-zoom-27gvrz

@martynasma martynasma added the bug label Apr 2, 2021
@martynasma
Copy link
Collaborator

I'm afraid, there's currently no way to disable cursor snapping dynamically, once it has been enabled. Sorry.

If we implement it at some point, I will let you know.

@zoony
Copy link
Author

zoony commented May 7, 2021

Bugs

If the cursor is unsnapped, the y-value bubble is not displayed when using either an X ValueAxis or an X DateAxis but is displayed when using an X CategoryAxis.

If the cursor is snapped when using an X ValueAxis, the snap jumps between widely separated x values as the mouse is moved in the x-direction. This can be seen in the demo page linked above. Snapping to each data point does occur after zooming in to display only a comparatively small number of data points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants