Skip to content

Update hover-text-and-formatting.md #4557

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

Merged
merged 10 commits into from
Apr 24, 2024
Prev Previous commit
Next Next commit
Update doc/python/hover-text-and-formatting.md
  • Loading branch information
LiamConnors authored Apr 22, 2024
commit b06b80b31e5ad9db4d4ed19d0e449b4286253bf6
4 changes: 2 additions & 2 deletions doc/python/hover-text-and-formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ for continent_name, df in continent_data.items():
# Text supports just one customized field per trace
# and is implemented here with text=df['continent'],
# Custom data supports multiple fields through numeric indices in the hovertemplate
# If I were not looking for an opportunity to demonstrate the text parameter,
# I would likely just add continent as a third customdata field.
# In we weren't using the text parameter in our example,
# we could instead add continent as a third customdata field.
customdata=df[['country','pop']],
hovertemplate=
"<b>%{customdata[0]}</b><br>" +
Expand Down