Plotly js single hover text format bug
A reproducible example of hovertemplate not using single text for all points
HTML
<!DOCTYPE html>
<html>
<head>
<!-- Plotly.js -->
<meta http-equiv="X-UA-Compatible" content="IE=11" >
<script src="https://cdn.plot.ly/plotly-2.5.1.min.js"></script>
</head>
<body>
<div id="907d5561-2510-4868-a86a-4ccf375fa3ce" style="width: 600px; height: 600px;"><!-- Plotly chart will be drawn inside this DIV --></div>
<script type="text/javascript">
var data = [
{
"type":"scatter",
"mode":"lines+markers",
"x":[1,2,3,4,5],
"y":[2.02825,1.63728,6.83839,4.8485,4.73463],
"showlegend":false,"text":"I will not be seen on the plot.",
"hovertemplate":"<i>Price</i>: $%{y:.2f}<br><b>X</b>: %{x}<br><b>%{text}</b>"
},
{
"type":"scatter",
"mode":"lines+markers",
"x":[2,3,4,5,6],
"y":[2.02825,1.63728,6.83839,4.8485,4.73463],
"showlegend":false,"text":"But without hovertemplate, it works.",
}
];
var layout = {};
var config = {};
Plotly.newPlot('907d5561-2510-4868-a86a-4ccf375fa3ce', data, layout, config);
</script>
</body>
</html>