-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Redraw scatterplot with new x and y coordinates #1153
Comments
Hi @danielhomola, I agree that the design choice of keying on position pair in the group, and by index when joining the data, is kind of a strange one. We've previously discussed this in #621 and #702. If your points are changing position, you might be better off with the bubble chart, which uses a key you specify, and joins by this key rather than by index. Going forward, we might need to make a breaking change on the scatter plot. Joining by index almost never produces good transitions, and using the position as a group key is of limited value as well. |
Hey @gordonwoodhull , thanks for getting back to me. I know about the bubble chart but I'd need brushing and last time I checked bubble charts don't support that.. am I wrong? |
Got it. Yes, you are correct about that. |
Thanks for confirming.. Also thanks for your answer in #621 . btw I'm working on a large project with automatically generated, respomsive dashboards, which I will open source soon, once it we published it, so I hope to pay back the community for this amazing package :) |
Fantastic, looking forward to seeing that. That's kind of the holy grail in this space (with all the attendant risks). |
Just ran into this myself. As I'm re-rendering after adding new scatter plot items to the chart the nodes all move around improperly as if the keyAccessor isnt working or recognizing which rendered nodes correspond to the data. Not sure how to move forward here. I'm currently using 4.2.7 and using the 'scatterPlot function' to create the instance of the chart. |
Hi,
Thanks so much for your wonderful work with this package. I've managed to build some really nice dashboards with it. I've been using the scatterChart and managed to change the positions of the points by redefining the chart's dimension, redefining it's group, and calling the redraw method. I also managed to save the selection of the brushOn method and redraw it in the new coordinates, see below:
My problem is, when I change the second / Y coordiantes so key[1] the redraw nicely moves each point with it's appropriate colours to its new position. But when I change the first / X coordinates (which is internally set as key[0]), the transition is all mixed up. What I mean is, all points end up where they should be, and all colours are right, the cross filtering with other charts works nicely as well but during the transition each point fades away and reappears from new places. I guess this is because the keys are internally sorted by key[0].
Is there any way to overcome this? I tried adding
and then
but it didn't work.
Thank a lot for your help in advance!
The text was updated successfully, but these errors were encountered: