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

Click event on chart is 'destroying' existing selection #936

Open
lucianbaciu opened this issue Mar 17, 2024 · 0 comments
Open

Click event on chart is 'destroying' existing selection #936

lucianbaciu opened this issue Mar 17, 2024 · 0 comments

Comments

@lucianbaciu
Copy link

The bug is easy to be reproduced.
In order to do so, use a simple example, like Grid Over Series (https://leeoniya.github.io/uPlot/demos/grid-over-series.html), and add one line of code at the end:

u.setSelect({left: 50, width: 400, height: 500}, false);

and:

 cursor: {
    drag: {
        setScale: false,
    },
},

in the settings.

image

A simple click outside of the selection (on chart), will make the selection to completely dissapear.

When having complex time rangers with selection and interaction, this becomes a big issue.

The issue was not happening into 1.6.22, but it does in 1.6.30

It may have to deal with the

   interface Drag {
/** post-drag "click" event proxy, default is to prevent these click events */
			click?: (self: uPlot, e: MouseEvent) => void;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant