Doesn't display Altair text when text is positioned with `altair.value()`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-visualization
Research direction
Start by reproducing the issue with the provided Python snippet and the streamlit.altair_chart entry point, using the listed Streamlit, Python, and browser versions as context. Trace how this chart is rendered in the browser when x and y use altair.value(); done means the “FFS” text appears in the Streamlit browser view as it does in Jupyter.
Written by the indexing model from the issue text.
Description
Summary
Streamlit shows Altair charts with text (made with mark_text()) but it doesn't show it sometimes. Specifically, I've found that it doesn't show text when the text is encode()ed with x and y positions that are altair.value() values. See below.
Steps to reproduce
Code snippet:
import streamlit
import altair
chart = altair.Chart().mark_text(text="FFS", size=160).encode(x=altair.value(0), y=altair.value(0))
figure = streamlit.altair_chart(chart)
Expected behavior:
A browser window should open with the text "FFS" in a large font, in black. This is expected when you view the chart above in a Jupyter notebook for example.
Actual behavior:
The Altair chart itself shows as expected in Jupyter notebook (for example), but the figure, which I expect to see in a browser when I streamlit run the Python script, doesn't show. Nothing much shows in the browser.
Is this a regression?
I'm new to Streamlit and I have no past reference for comparison.
Debug info
- Streamlit version: 1.9.0
- Python version: 3.10.1
- Using Conda? PipEnv? PyEnv? Pex? None. Just plain
pip. - OS version: Windows 11
- Browser version: 101.0.4951.67
- Dominant language
- Python
- Stars
- 45.8k
- Forks
- 4.4k
- Avg merge
- 21h 22m
- Merged PRs (30d)
- 316
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from streamlit/streamlit
-
area:backend area:network feature:embedding feature:runtime priority:P3 status:confirmed type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:frontend area:security feature:st.file_uploader status:unlikely type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area:backend area:security feature:cache feature:cache-hash-func priority:P4 status:confirmed type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:mobile feature:st.camera_input papercut type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:ai type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
All issues in streamlit/streamlit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100