My hover template has this “trace 0” thing that I didn’t ask for, anyone know how to get rid of it. Here is the code for my chart. Let me know if it would be helpful to add that values of the variables and I will.
fig = go.Figure([go.Bar(x=x, y=[poverty_rate_change,
poverty_gap_change,
gini_change],
text=[poverty_rate_change,
poverty_gap_change,
gini_change],
hovertemplate=['Original poverty rate: ' + original_poverty_rate_string + '%<br>'
'New poverty rate: ' + poverty_rate_string + '%',
'Original poverty gap: $' + original_poverty_gap_billions + 'B<br>'
'New poverty gap: $' + poverty_gap_billions + 'B',
'Original gini: ' + original_gini_string +
'<br>New gini: ' + gini_string],
marker_color=BLUE)])
# Edit text and display the UBI amount and percent winners in title
fig.update_layout(uniformtext_minsize=10, uniformtext_mode='hide', plot_bgcolor='white')
fig.update_traces(texttemplate='%{text}%', textposition='auto')
fig.update_layout(title_text='Your changes would fund an annual UBI of $'+ ubi_string + ' per person.<br>' +
winners_string + '% of people would be better off under this plan.')
fig.update_xaxes(
tickangle = 0,
title_text = "",
tickfont = {"size": 14},
title_standoff = 25)
fig.update_yaxes(
title_text = "Percent change",
ticksuffix ="%",
tickprefix = "",
tickfont = {'size':14},
title_standoff = 25)
fig.update_xaxes(title_font=dict(size=14, family='Roboto', color='black'))
fig.update_yaxes(title_font=dict(size=14, family='Roboto', color='black'))