Closed
Description
I need to scale data with a custom function (let's say log2
). Right now I'm doing that by:
- Scaling my data before passing it into plotly. (easy)
- Determining nice locations for tick marks. (sort of painful)
- Setting
tickvals
andticktext
to the scaled and unscaled values, respectively. (easy enough)
This works okay, except that the hover info shows the transformed values (e.g. log2(x)
instead of x
). As far as I can tell, there's no way to change that. I would have to set hoverinfo: "none"
, listen to plotly_hover
and implement my own tooltip.
Some solutions I can think of:
- Accept a custom scale function that would be applied to the data before plotting it, but not to the tick text or hoverinfo text. Might take some thought as far as making this work nicely with the axes code.
- Accept a function for
hoverinfo
that is called with some data (x
,y
,z
,text
,name
probably); return value is displayed in the hover. This goes with the workaround I listed above, but also seems like a very nice feature.
This could help with #221 and any other future requests for new scales.
Metadata
Metadata
Assignees
Labels
No labels