-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Pass customdata to 'fill' or trace itself. #2504
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
Comments
That would be nice for sure! Thanks for writing in. The hardest part about this here is to find a suitable API. For point data, coordinates and fields like |
Would it be possible to have something like: customdata={
'points': customdata_for_points,
'fill': customdata_for_fills
},
customdatamode='points+fills' Ignoring the lazy naming, the point is that you could use an additional variable to set the mode for interpreting the customdata argument. By default it could be 'points', meaning it would follow current behavior allowing backwards compatibility, but at the same time you could set new modes that allow for new features such as customfilldata (without making a new tightly coupled kwarg) Sorry, I can only see this through the python lens, but hopefully it can make some sense in JS as well. |
One thing we could do without changing the API at all is add the |
Maybe a generic solution could be to add a second trace attribute like I have a use case where this would be useful: I have a heatmap where the data is updated by a |
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson |
Hi custom data info on a trace level would be very nice. As this would easily enable custom behavior on trace level. In my case it is custom logic for trace highlighting. The current options I have:
Problems with option 1:
Problems with option 2:
Looking at the trade-offs it seems that option 1 is the best but it feels just so convoluted to start doing custom parsing of strings... While it feels like this could be an easy addition. Would it not be possible to add for each trace a: "custom_trace_data" which is of type json-object and the end-user is fully responsible on its structure. Please consider reopening this issue. |
I am a plotly.py/Dash user and recently ran into a little blocker regarding the customdata feature.
The situation:
I am using go.Scatter with options
name='trace_name', mode='lines', fill='toself', hoveron='fills+points', customdata=some_preset_data, text=some_preset_text
to make traces that each represent a polygon.
Limits of current customdata feature:
The hoveron='fills+points' option allows the user to see text and interact with customdata when hovering/clicking on points, which is great. However, when hovering over the fill (which gives the feeling of representing the trace itself), the user is limited to seeing the name property ('trace_name' here) on hover and only being able to interact with the curveNumber of the trace - customdata and text don't show up because they are 'unique' to each point.
Feature request:
As a user, I would like to be able to attach customdata and/or text to fill elements or the trace itself. Purely from a user point of view, there seems to be a disconnect there, where the 'fills' and 'points' in the hoveron='fills+points' options have highly different levels of hoveron customizability/functionality.
Unfortunately, I am not a javascript programmer and cannot add much (if anything) to how this would be implemented, but I was directed here from the plotly/dash forum as this seems to be an issue pertinent to plotly.js itself.
Relevant plotly/dash forum:
https://community.plot.ly/t/dcc-graph-only-curvenumber-is-showing-up/9225
The text was updated successfully, but these errors were encountered: