-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
type:docsRequests for changes to docs (will be rerouted to docs repo)Requests for changes to docs (will be rerouted to docs repo)
Description
From the forums we found out a discreapancy between the Streamlit embedded app for Altair chart and the relevant Altair code.
The code reads :
c = alt.Chart(df).mark_circle().encode(x='a', y='b', size='c', color='c')so there is no tooltip, but in the embedded app there is a tooltip appearing.
so I guess the correct code should read :
c = alt.Chart(df).mark_circle().encode(x='a', y='b', size='c', color='c', tooltip=['a', 'b', 'c'])if we don't want to modify the embedded app.
Link to doc page in question (if any):
All the links that point to the same Streamlit embedded app :
- https://docs.streamlit.io/api.html#streamlit.altair_chart
- https://docs.streamlit.io/api.html#streamlit.write
- https://docs.streamlit.io/api.html#streamlit.vega_lite_chart
What you think the docs should say:
For Altair :
c = alt.Chart(df).mark_circle().encode(x='a', y='b', size='c', color='c', tooltip=['a', 'b', 'c'])For vega-lite :
st.vega_lite_chart(df, {
"mark": {"type": "circle", "tooltip": True},
'encoding': {
'x': {'field': 'a', 'type': 'quantitative'},
'y': {'field': 'b', 'type': 'quantitative'},
'size': {'field': 'c', 'type': 'quantitative'},
'color': {'field': 'c', 'type': 'quantitative'}
},
})Also
So I could find charts.vega_lite_chart.py source file for a Streamlit vega-lite but there's no tooltip so I guess that's not the one which generated the embedded app. Could not find charts.altair_chart.py nor text.write4.py so I'm not sure which source file generated the app.
Metadata
Metadata
Assignees
Labels
type:docsRequests for changes to docs (will be rerouted to docs repo)Requests for changes to docs (will be rerouted to docs repo)