Repository: streamlit/streamlit

Issue:
Some labels in Altair charts are hard to see in dark mode
### Summary

Streamlit has an awesome feature where it changes the label colors of Altair charts when you switch to dark mode. Sweet!

However, it seems that some labels were omitted and thus remain almost illegibly dark in dark mode.

### Steps to reproduce

Run this code snippet [taken from the Altair documentation](https://altair-viz.github.io/gallery/grouped_bar_chart.html):

```python
from vega_datasets import data

st.subheader("barley example")
source = data.barley()
st.write(source)
st.write(
    alt.Chart(source)
    .mark_bar()
    .encode(x="year:O", y="sum(yield):Q", color="year:N", column="site:N")
)
```

### Expected  vs actual behavior

In light mode it displays properly:

![image](https://user-images.githubusercontent.com/1673013/120058948-18e49300-c003-11eb-8b03-7010272c76de.png)

but in dark mode some of the labels have remained black and are almost impossible to read:

![image](https://user-images.githubusercontent.com/1673013/120058943-09654a00-c003-11eb-9784-4eb36a336153.png)

**Note:** I have marked the errors in red.

### Is this a regression?

Not sure.

### Debug info

- Streamlit version: `Streamlit, version 0.82.0`
- Python version: `Python 3.8.5`
- PipEnv: `pipenv, version 2020.11.15`
- OS version: `Ubuntu 20.04.2 LTS`
- Browser version: `Version 91.0.4472.77 (Official Build) (x86_64)`



Discussion:
Thanks for the report. I have confirmed it. My guess is some config needs to be set correctly in VegaLite config for this particular style of chart.
What about this issue? Any fix?
Did you find any hack to solve it for the meantime?
@kmcgrady @treuille 
@kmcgrady Is it actually possible to have the theme of streamlit's light mode applied to altair charts while in dark mode? (i.e. yes, I want a white background and black labels/axes etc. on altair charts while the page is actually rather dark).
I just desperately searched for how to revert altair charts to some kind of "default" theme but I don't seem to find anything.

Resolving patch:
diff --git a/e2e/scripts/st_arrow_altair_chart.py b/e2e/scripts/st_arrow_altair_chart.py
--- a/e2e/scripts/st_arrow_altair_chart.py
+++ b/e2e/scripts/st_arrow_altair_chart.py
@@ -48,12 +48,6 @@
 
 chart = alt.Chart(data).mark_bar().encode(x="a", y="b")
 
-st.write("Bar chart with default theme:")
-st._arrow_altair_chart(chart)
-
-st.write("Bar chart with streamlit theme:")
-st._arrow_altair_chart(chart, theme="streamlit")
-
 st.write("Bar chart with overwritten theme props:")
 st._arrow_altair_chart(chart.configure_mark(color="black"), theme="streamlit")
 
@@ -77,3 +71,20 @@
 
     st.write("Pie Chart with more than 4 Legend items")
     st._arrow_altair_chart(chart, theme="streamlit")
+
+# taken from vega_datasets barley example
+barley = alt.UrlData(
+    "https://cdn.jsdelivr.net/npm/vega-datasets@v2.7.0/data/barley.json"
+)
+
+barley_chart = (
+    alt.Chart(barley)
+    .mark_bar()
+    .encode(x="year:O", y="sum(yield):Q", color="year:N", column="site:N")
+)
+
+st.write("Grouped Bar Chart with default theme:")
+st.altair_chart(barley_chart, theme=None)
+
+st.write("Grouped Bar Chart with streamlit theme:")
+st.altair_chart(barley_chart, theme="streamlit")


Test patch: