Pre-1.16, Altair charts would not have tooltips unless they were explicitly defined. Now, tooltips are automatically-generated even if they are not defined. Setting theme=None does NOT revert this behavior. Setting tooltip=[] or tooltip=alt.Value(None) causes the chart to have a tooltip that simply reads “true”.
Steps to reproduce
Just make any chart and don’t specify tooltips. They’ll show up, even if you don’t want them. Even if you explicitly define them as blank as described above, you’ll still get a little box popping up saying “true”.
Expected behavior:
Several options, not mutually exclusive:
The tooltip behavior could revert when setting theme=None
The tooltip behavior could be reverted by a separate keyword option: e.g., autoTooltips=False
Setting tooltip=[] or tooltip=alt.Value(None) could appropriately leave the chart with NO tooltips, rather than the weird phantom “true”.
Small update: I have rolled back my cloud deployment of Streamlit to v1.15, and will leave it there until/unless I find a different way to resolve this issue.
Some graphs should not have tooltips. Forcing tooltips, even in inappropriate situations, is a major loss of functionality.
Got a related prob with Plotly and st.plotly_chart since 1.16.
With the introduction of 1.16 Streamlit uses a new theme. Okay, I can skip this theme via theme=None.
But then I do not get the same Plotly charts as before in version 1.14.
Such an adaption is not cool as it is not backwards compatible or at least in an easy way.
Hi @dirk ,
sorry to hear that the plotly charts are not showing up properly in version 1.14 and 1.16, especially when you set the theme=None.
When we were working on this, we definitely wanted to keep it backwards compatible. If you wish to turn off the streamlit theme for all plots,
you can use this:
import plotly.io as pio
pio.templates.default = "none"
As for the actual plots, can you possibly give me the code to reproduce the problem that you’re having. I would love to figure what’s going on and attempt to fix it on our side!
sorry to hear that the tooltips are showing up no matter what. Can you show me some code so that I can reproduce it and then hopefully apply a fix asap?