-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
customdata not working in x/y/z heatmap #4260
Comments
Even worse: This is obviously wrong for x/y/z heatmaps. |
We should probably build a 2d-indices-to-1d-index map somewhere in plotly.js/src/traces/heatmap/convert_column_xyz.js Lines 37 to 42 in bead43f
plotly.js/src/traces/heatmap/convert_column_xyz.js Lines 56 to 57 in bead43f
|
Just ran into this and was wondering a fix is planned soon? I'm looking at trying to look up the custom data value "manually", but the pointNumber 2D array doesn't seem to correspond with anything I can use to locate an object in the customdata array. It also doesn't look like there's a way to pass anything else through to the hover event handler (I tried using text, hovertext, etc. to try and pass some lookup value through). Edit: Actually, it looks like I can look up the custom data index using |
@etpinard I was trying out the new version of Plotly with this fix. Looking at your Codepen, I can see that it works for simple X/Y/Z arrays. But unfortunately, it still lacks custom data and shows 2D array for pointNumber when using a 2D array for the Z values. https://codepen.io/brian428/pen/eYNqgXE?editors=0010 |
@antoinerg would you mind having a look at this? |
As far as I can tell, customdata is working in heatmap, but it must have the same shape as |
Even in that case, the pointNumber, pointIndex, etc. are 2D arrays rather than an integer. https://codepen.io/brian428/pen/RwWwgRL?editors=0010 Is this actually the intended behavior? |
@brian428 I've found the same, but I'm running into an issue where I have large 2D data for |
I know this issue is closed, but I have the same issue as @Wes-Kuegler -- I have a 1,000 x 100,000 matrix and a length-1000 customdata that i'd like to apply row-wise. If I use @Wes-Kuegler's workaround, my filesizes and load times become really unmanageable. Is this issue (perhaps more of a feature request?) tracked anywhere else? I would be greatly appreciative if there was been (or could be) any work on this! |
@naten7k this is getting to a level of granularity that's pretty tough to envision adding declaratively (though if you have a proposal we'd be happy to consider it), but straightforward to manage imperatively by responding to hover events. If you're doing this in |
@alexcjohnson yeah, I sort of figured that would be the case. It's tough to imagine how you'd the correspondence when the shape of I'm not using Dash, so unfortunately that solution doesn't work so well for me. However, I did find a hacky solution that works well for me. It was to (1) turn off hovertext for the heatmap, (2) set |
in both
hovertemplate
and hover data.See https://codepen.io/etpinard/pen/bGGNXoz?editors=1010
The text was updated successfully, but these errors were encountered: