Open orenbenkiki opened 5 years ago
Thanks for writing in.
In your proposed %{data.pmeta.foo.%{x}}
, is %{x}
a (string) key or a (number) index?
Good question...
I think that %{x}
should be a string and be used as a key. After all, a normal %{x}
expands into a string.
Perhaps an additional syntax such as [%{x}]
should be allowed if x
is known to be an integer and the data is known to be an array. "Explicit is better than implicit" :-)
Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, 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 backlog. Thanks for your help - @gvwilson
Yes, this is still a concern. But after almost 5 years, is there much point in re-opening it? Perhaps you should have changed the status to "won't fix" rather than "completed".
thanks @orenbenkiki - I'll reopen and assign to myself, and try to get it into our backlog.
Thanks!
Problem Description.
Displaying a heatmap, I'd like to include in the hover box some data which depends only on the X (column) or Y (row).
Describe the solution you'd like
Allow specifying
%{data.pmeta.foo.%{x}}
and/or%{data.pmeta.bar.%{y}}
in thehovertemplate
. In general, if a path element is in the format%{...}
, then evaluate it, and use this as the next key.Describe alternatives you've considered
It is possible to specify per-entry hover text for a heatmap, but this would require precomputing and sending much more data between the client and the server (N * M complete texts instead of N + M text fragments).