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

add Scatter events to Lines with markers #1494

Open
nicole-brewer opened this issue May 6, 2022 · 0 comments
Open

add Scatter events to Lines with markers #1494

nicole-brewer opened this issue May 6, 2022 · 0 comments

Comments

@nicole-brewer
Copy link

This is a feature that I would like, and looking through old issues it seems that many others have also needed in the past all the way back to 2016. Issues #729 and #532 both implement work-arounds to absence of this feature, but neither of them are ideal for my case.

In #729, the developer chose to update the their line graph on upon the on_drag_end event. In my case, where there are many overlapping lines, so visually disconnecting the marker from the line would look very confusing to a user.

Therefore I went with the workaround show in #532, but as you can see below, this requires making the markers invisible so you don't see them glitching upon click and drag. Its performance is also slower than a regular marker event, but bearable. I may end up using interactive matplotlib to achieve this graph instead, even though I have to hack it a little to support traitlet events.

Screen Recording 2022-05-06 at 2 36 25 PM

As was discussed in issue #110, this feature is supposedly easy to implement.

Moving the nodes will be easy now. We can have drag on the Scatter and keep the Lines in sync with it. I can write up a quick example for that. The easiest way to do this would be to have the drag behavior on Lines with markers so that we need not do they sync stuff manually. This is part of the bigger to do, which is to add Scatter events to Lines with markers. Once we have that it should be very straight forward.

Others have more recently indicated their interest in this feature.

Sorry to come back to this old issue, but you say that allowing to drag nodes would be easy to implement. However, it seems that the bqplot.marks.Graph does not allow it when nodes are placed using x and y attributes. I'm wondering if it can be made in this case.

As someone who uses Jupyter to write a lot of web apps, a traitlets-based plotting lib is the best thing since ipywidgets. Thanks!

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