We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm working with the latest version plotly.__version__ == '4.8.1'. If I add labels the formatting in hover_data is not working.
plotly.__version__ == '4.8.1'
labels
hover_data
import pandas as pd import plotly.express as px diz = {'bins': {0: 'till 500', 1: 'till 500', 2: '501-600', 3: '501-600', 4: 'more 601', 5: 'more 601'}, 'data': {0: 4, 1: 26, 2: 15, 3: 35, 4: 41, 5: 9}, 'longitude': {0: 12.5, 1: 65.5, 2: 122.58333, 3: 12.58333, 4: -115.53333, 5: 55.53333}, 'latitude': {0: 27.5, 1: 29.5, 2: 45.36667, 3: 55.36667, 4: 38.08, 5: -38.08}, 'names': {0: 'Name2', 1: 'Name4', 2: 'Name1', 3: 'Name5', 4: 'Name3', 5: 'Name6'}} df = pd.DataFrame(diz) fig = px.scatter_geo(df, lon='longitude', lat='latitude', color='bins', color_discrete_sequence=px.colors.qualitative.Set1, hover_name="names", size='data', opacity=0.7, projection="equirectangular", size_max=35, hover_data={"longitude": False, "latitude": False, "names": False, "data": ":.2f"}, # If one comment out the following two lines # "data" is formatted as in hover_data labels={"bins": "Bin", "data": "Data"} ) fig.show()
The text was updated successfully, but these errors were encountered:
emmanuelle
Successfully merging a pull request may close this issue.
I'm working with the latest version
plotly.__version__ == '4.8.1'
. If I addlabels
the formatting inhover_data
is not working.The text was updated successfully, but these errors were encountered: