Hovertemplate Greys-Out Text When There is a Line Break

I’m trying to have a tooltip on a bar chart that displays 2 data points: the date and a count on that date. If I keep both points on one line, the text displays as expected:

fig5 = px.bar(x=[x[‘publish_date’] for x in doc_data], y=[x[‘document_count’] for x in doc_data])
fig5.update_traces(hovertemplate=’%{y} Documents :: %{x}’)

But when I insert a line break, the text is dimmed:

fig5 = px.bar(x=[x[‘publish_date’] for x in doc_data], y=[x[‘document_count’] for x in doc_data])
fig5.update_traces(hovertemplate=’%{y} Documents <br>%{x}’)

Any ideas on how to fix this?

I’m hoping @atharvakatre will have an opinion on this…

@mikenyc
Unfortunately I couldn’t reproduce the error. Can you share a MWE (minimal working example) that I can run?

Also while adding code to your post use the </> code icon of the editor.

Here’s an awesome guide to posting questions and increasing the chances of getting answers on this forum - How to Get your Questions Answered on the Plotly Forum