Skip to content
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

(x|y)hoverformat #5552

Closed
nicolaskruchten opened this issue Mar 16, 2021 · 9 comments
Closed

(x|y)hoverformat #5552

nicolaskruchten opened this issue Mar 16, 2021 · 9 comments
Labels
feature something new

Comments

@nicolaskruchten
Copy link
Contributor

nicolaskruchten commented Mar 16, 2021

All traces that support (x|y)period should also support (x|y)hoverformat which is the formatting that will be applied to the x or y value when it appears in any hoverlabel: unified, compare (both point and axis, thereby overriding (x|y)axis.hoverformat) and closest.

@nicolaskruchten nicolaskruchten added the feature something new label Mar 16, 2021
@archmoj
Copy link
Contributor

archmoj commented Mar 18, 2021

It looks we shouldn't apply this format on date axes.
What are the other cases?

@archmoj
Copy link
Contributor

archmoj commented Mar 18, 2021

Also to mention the zhoverformat is used in heatmap and contour for numbers and dates:

zhoverformat: {
valType: 'string',
dflt: '',
editType: 'none',
description: [
'Sets the hover text formatting rule using d3 formatting mini-languages',
'which are very similar to those in Python. See:',
FORMAT_LINK
].join(' ')
},

@archmoj
Copy link
Contributor

archmoj commented Mar 18, 2021

It looks we shouldn't apply this format on date axes.
What are the other cases?

Nevermind. That will works for date axes.

@nicolaskruchten
Copy link
Contributor Author

Yes, date axes are most of the reason for this, so it will work with periods :)

@archmoj
Copy link
Contributor

archmoj commented Mar 22, 2021

In addition to traces covered by #5563, it is possible to add this option for heatmapgl, as well as gl3d traces.

@nicolaskruchten
Copy link
Contributor Author

nicolaskruchten commented Mar 22, 2021

We can add it to these other traces if it doesn't take more than a combined total of an hour :)

@jxu
Copy link

jxu commented Jun 7, 2021

Is this what changed in v2.0.0 the marker text in scatterplot to show (x,y) instead of just y?

@nicolaskruchten
Copy link
Contributor Author

In v2 we did change the default hover mode from "x" to "closest" yes. The feature described in this issue works with all hover modes.

@archmoj
Copy link
Contributor

archmoj commented Jun 7, 2021

Is this what changed in v2.0.0 the marker text in scatterplot to show (x,y) instead of just y?

@jxu No please see #5647. Alternatively you can set hovermode: 'x' with v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

3 participants