question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

texttemplate vs hovertemplate

See original GitHub issue

This pen https://codepen.io/nicolaskruchten/pen/YzzXwdL shows some differences between texttemplate and hovertemplate, specifically that %{y} in texttemplate doesn’t seem to pick up the formatting from the yaxis ticklabels the way hovertemplate does.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
antoinergcommented, Oct 9, 2019

Mmm… that is unfortunate indeed. The code path a value takes before reaching texttemplate and hovertemplate is a bit different hence the difference. We should aim to close the gap.

I’d call this bug, axis tickformat, tickprefix and ticksuffix should be considered in texttemplate. Internally, this means using Axes.tickText everywhere.

I agree that the default labels should contain those 3 tick properties.

1reaction
etpinardcommented, Oct 30, 2019

Here’s my WIP branch:

https://github.com/plotly/plotly.js/compare/texttemplate-formatting-fixes

Anyone should feel free to pull it down and add commits to it during the next two weeks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hover text and formatting in JavaScript - Plotly
Over 12 examples of Hover Text and Formatting including changing color, size, log axes, and more in JavaScript.
Read more >
Introduction to Hovertemplate in Plotly Graphs - Medium
In this paper, we'll try to point out what hovertemplate is in Plotly, how we can use it, and how we can add...
Read more >
Python/Plotly: How to customize hover-template on with what ...
This will create simple two scatter3d plots, where hoverdata is x,y and z axis. Now you want to add the data m=[9,8,7,6,5] to...
Read more >
Hover Text and Formatting in Python-Plotly - GeeksforGeeks
Example 1: user_defined hovertemplate ... Here, GDP and Expectancy is used as naming convention about the data whereas %{ <variable>} which allows ...
Read more >
plotly.graph_objects package — 5.11.0 documentation
The 'hovertemplate' property is a string and must be specified as: A string ... Sets the source reference on Chart Studio Cloud for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found