-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
How to Return Data When Brushing the Axis of Parallel Coordinate Plot #345
Comments
Pardon my ignorance, but what does brushing mean? I cannot find any references in the plotly documentation - https://plotly.com/javascript/reference/ Is it like hovering or selecting? |
Hi, sorry for the confusion in my previous post. In the parallel coordinate plot I’m working with, I can select a region on the axis, but I haven't been able to find a method to retrieve the selected data. Currently, only the onRestyle event is triggered during selection, but this event doesn’t provide the selected data itself. I’d like to retrieve the data associated with the lines in the selected region on axis and use that to update another component. Thank you. |
Hello, I am still not sure what it is you are trying to do. From what I do understand of your question, you could consider listening to a different event like OnSelected or OnSelecting. There are many other events you can listen to other than onRestyle - https://github.com/plotly/react-plotly.js?tab=readme-ov-file#event-handler-props If you are not actually selecting data, and you are only doing a change of the layout, only relayout is going to fire. If that is the case, you need to filter the data set in a useEffect yourself based on the axes data emitted from the on. If the event you are listening to does not have the data you need, you can use Hooks on the layout object. Here is a ROUGH draft, to give you an idea. It will not run. If you post your own code, that would be easier.
|
Hello,
I've implemented a parallel coordinate plot and want to enhance it by updating another component based on the results of brushing. Specifically, when I brush over the plot, I’d like to retrieve the data associated with the highlighted lines and use that to update another component.
I noticed that only the
onRestyle
event is triggered during brushing, but it doesn’t provide the selected data.Could anyone help me figure out how to achieve this functionality?
Thank you!
The text was updated successfully, but these errors were encountered: