Repository: streamlit/streamlit
Pull request: Horizontal `st.bar_chart`
## Describe your changes
PR adds a boolean kwarg `horizontal=False|True` to `st.bar_chart`. The default is `False`, which keeps the current behavior.

## Testing Plan
- E2E Tests - ✅ 
- Manual Testing - ✅ 
**Note: The substantial # of snapshot changes are a consequence of the test file organization**
Added 2 horizontal bar chart examples in sequence so charts indexed 22 on have all been shifted down - 
`st_builtin_chart-22.png` is now `st_builtin_chart-24.png` and so on.
----

**Before (Vertical only):**
<img width="300" alt="Screenshot 2024-06-11 at 2 36 30 PM" src="https://github.com/streamlit/streamlit/assets/63436329/3f9df8fb-5787-466c-b7da-fba144c622c0">
<img width="300" alt="Screenshot 2024-06-11 at 2 36 00 PM" src="https://github.com/streamlit/streamlit/assets/63436329/0f70e765-8a89-4355-9b85-af04e071c019">

**After (`horizontal=true`):**
<img width="500" alt="Screenshot 2024-06-11 at 2 36 21 PM" src="https://github.com/streamlit/streamlit/assets/63436329/9d1c69d6-20fa-4755-a68e-496b48b75dfc">
<img width="500" alt="Screenshot 2024-06-11 at 2 35 50 PM" src="https://github.com/streamlit/streamlit/assets/63436329/3c5ec144-77a7-4217-84f9-f0e2ac27a5d8">


Problem statement:
Horizontal bar charts
### Problem 

When having a bar chart with string indices it is very hard to read them.

### Solution

Support `barh` type chart, where the bars are horizontal rather than vertical.

So new interface would be:
```
streamlit.bar_chart(data=None,  orientation='vertical', width=0, height=0)
```

### Additional context

In `pandas` it is very simple `df.plot.barh()`

---

Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

**If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.**

Hints from issue discussion:
Hi @AmitMY, thanks a lot for the feature request. We will triage and add to our roadmap accordingly to our prioritization. In the meantime, we do support charting libraries like `altair` and also `matplotlib` that you can use to customize a chart. In this way you can get a more advance chart with little effort. Doc link [here](https://streamlit.io/docs/api.html#display-charts).
For example, `st.st.pyplot()` will just render any matplotlib figure and `st.altair_chart(my_chart)` will render an altair chart, `my_chart` defined with `altair` (https://altair-viz.github.io/), so you can use all the expressive power of these libraries and then display the charts with Streamlit.

Still, we need the basic charting options to be surfaced in Streamlit, so this is a really useful feature request.

Best,
Matteo

Commit message: More snaps

Patch to review:
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[chromium].png
index 9f31492e1cba..54eaa5af708e 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[firefox].png
index 7103ccaa3eba..4073a50f18ae 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[webkit].png
index d7361c829796..617b932a6437 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-22[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[chromium].png
index a5a7714fcf8a..7badc2f8f7bb 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[firefox].png
index c564336a7fa2..31fe755ca2d7 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[webkit].png
index 803862adc3e2..a9b32696b706 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-23[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[chromium].png
index 5c9b3293f36c..9f31492e1cba 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[firefox].png
index 3431bd0b2dad..d2691aefcd1d 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[webkit].png
index aaf6e9bb09d1..d7361c829796 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-24[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[chromium].png
index 21edeb94a6ed..a5a7714fcf8a 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[firefox].png
index f7760b931c49..3738686e6d4d 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[webkit].png
index de7bd7e63720..803862adc3e2 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-25[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[chromium].png
index 23c7fd603ec0..32bd588979c0 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[firefox].png
index 6965b804713a..868ba20419b4 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[webkit].png
index 8a784f1910bb..aaf6e9bb09d1 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-26[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[chromium].png
index 801216d996a2..00bba131547f 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[firefox].png
index d2e052b368e2..311549ee3934 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[webkit].png
index f04bf42905b3..de7bd7e63720 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-27[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[chromium].png
index f46a7966283b..23c7fd603ec0 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[firefox].png
index e6eb09039221..6965b804713a 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[webkit].png
index 3bde8bd046f7..8a784f1910bb 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-28[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[chromium].png
index 5c9b3293f36c..801216d996a2 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[firefox].png
index 868ba20419b4..1af7eda06556 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[webkit].png
index aaf6e9bb09d1..f04bf42905b3 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-29[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[chromium].png
index 5593380243a7..f46a7966283b 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[firefox].png
index fce53a46ab70..d83be042393c 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[webkit].png
index 0830cc465dad..3bde8bd046f7 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-30[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[chromium].png
index 098710b31dcb..5c9b3293f36c 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[firefox].png
index 3678819a18ca..3431bd0b2dad 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[webkit].png
index d4399ff1ad0d..aaf6e9bb09d1 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-31[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[chromium].png
index 8f95f9789e7a..686286651432 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[firefox].png
index 38a5390a758c..ed61d4b8b714 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[webkit].png
index 31ff635b55c6..0830cc465dad 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-32[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[chromium].png
index 46b25e12877a..dbcad5306238 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[firefox].png
index 7103ccaa3eba..b05d0f6dcbda 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[webkit].png
index d7361c829796..d4399ff1ad0d 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-33[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[chromium].png
index 887bed28effc..8f95f9789e7a 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[firefox].png
index b074879d10c6..8e1d32a87457 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[webkit].png
index b19832e1c7f1..31ff635b55c6 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-34[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[chromium].png
index 3598d33ba845..9f31492e1cba 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[firefox].png
index e9da2ce7942a..7103ccaa3eba 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[webkit].png
index 26c201b664b6..d7361c829796 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-35[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[chromium].png
index 1de18356acf7..ae37c895ca2b 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[firefox].png
index 2abaed36fdbf..21041f7f0e47 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[webkit].png
index ca0168bb9154..b19832e1c7f1 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-36[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[chromium].png
index 7609cc3be8ab..3598d33ba845 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[firefox].png
index 2f0d4628f62c..3f072ff8154b 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[webkit].png
index 278673468cc4..26c201b664b6 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-37[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[chromium].png
index 5039c26ca9e2..1de18356acf7 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[firefox].png
index 490474dd2090..4d0d3b216b50 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[webkit].png
index e8340b5d2fc8..ca0168bb9154 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-38[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[chromium].png
index f26ce03325ea..7609cc3be8ab 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[firefox].png
index e2a24be07741..168f0f845ba5 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[webkit].png
index 04ad545ed451..278673468cc4 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-39[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[chromium].png
index 3598d33ba845..1eea34cbd156 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[firefox].png
index 3f072ff8154b..43a23a4a22b1 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[webkit].png
index 26c201b664b6..e8340b5d2fc8 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-40[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[chromium].png
index cbcd83e91b1d..e89a2b8b1700 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[firefox].png
index e13ea824f5f9..b566e8289168 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[webkit].png
index 77da0cbf1051..04ad545ed451 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-41[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[chromium].png
index d902605fc163..3598d33ba845 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[firefox].png
index 86c933b0c78e..e9da2ce7942a 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[webkit].png
index 5656f3ea19ab..26c201b664b6 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-42[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[chromium].png
index 76e27998b777..cbcd83e91b1d 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[firefox].png
index 639d4d6fa40a..a8432154274a 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[webkit].png
index bb5fdac50dfb..77da0cbf1051 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-43[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[chromium].png
index a514cc9ec586..d902605fc163 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[firefox].png
index b867b8a9a221..86c933b0c78e 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[webkit].png
index 61ee2c8620fe..5656f3ea19ab 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-44[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[chromium].png
index f58bf1f4f0c6..5d484d6d7341 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[firefox].png
index 012d6526a09f..a56014d3a00a 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[webkit].png
index d23bee7c1ba0..bb5fdac50dfb 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[webkit].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-45[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[chromium].png
new file mode 100644
index 000000000000..7caba422081e
Binary files /dev/null and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[firefox].png
new file mode 100644
index 000000000000..2a5e58491953
Binary files /dev/null and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[webkit].png
new file mode 100644
index 000000000000..61ee2c8620fe
Binary files /dev/null and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-46[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[chromium].png
new file mode 100644
index 000000000000..159a16438e6a
Binary files /dev/null and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[firefox].png
new file mode 100644
index 000000000000..8a2b470c64f2
Binary files /dev/null and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[webkit].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[webkit].png
new file mode 100644
index 000000000000..d23bee7c1ba0
Binary files /dev/null and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-47[webkit].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-line_chart_themed[dark_theme-firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-line_chart_themed[dark_theme-firefox].png
index 55df90bd2326..0bd8a1ad3c5e 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-line_chart_themed[dark_theme-firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-line_chart_themed[dark_theme-firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-line_chart_themed[light_theme-firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-line_chart_themed[light_theme-firefox].png
index c564336a7fa2..3738686e6d4d 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-line_chart_themed[light_theme-firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-line_chart_themed[light_theme-firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[dark_theme-chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[dark_theme-chromium].png
index 1d1bfaad7bbd..30bf4c563cca 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[dark_theme-chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[dark_theme-chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[dark_theme-firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[dark_theme-firefox].png
index d9a909b127a8..a0befb739062 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[dark_theme-firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[dark_theme-firefox].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[light_theme-chromium].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[light_theme-chromium].png
index 887bed28effc..ae37c895ca2b 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[light_theme-chromium].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[light_theme-chromium].png differ
diff --git a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[light_theme-firefox].png b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[light_theme-firefox].png
index b074879d10c6..21041f7f0e47 100644
Binary files a/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[light_theme-firefox].png and b/e2e_playwright/__snapshots__/linux/st_builtin_chart_test/st_builtin_chart-scatter_chart_themed[light_theme-firefox].png differ
diff --git a/e2e_playwright/st_builtin_chart.py b/e2e_playwright/st_builtin_chart.py
index ea9ffcaaace9..2211cd745361 100644
--- a/e2e_playwright/st_builtin_chart.py
+++ b/e2e_playwright/st_builtin_chart.py
@@ -83,6 +83,8 @@
 st.bar_chart(utc_df)
 st.bar_chart(color_df, x="a", y="b", color="e")
 st.bar_chart(df, x_label="X Axis Label", y_label="Y Axis Label")
+st.bar_chart(df, horizontal=True)
+st.bar_chart(df, horizontal=True, x_label="X Label", y_label="Y Label")
 
 st.header("Line Chart")
 
diff --git a/e2e_playwright/st_builtin_chart_test.py b/e2e_playwright/st_builtin_chart_test.py
index 33134941bfbd..d713af46a805 100644
--- a/e2e_playwright/st_builtin_chart_test.py
+++ b/e2e_playwright/st_builtin_chart_test.py
@@ -16,7 +16,7 @@
 
 from e2e_playwright.conftest import ImageCompareFunction
 
-TOTAL_CHARTS = 46
+TOTAL_CHARTS = 48
 
 
 def test_built_in_chart_rendering(app: Page, assert_snapshot: ImageCompareFunction):
@@ -44,7 +44,7 @@ def test_themed_chart_rendering(
     # Only test a single selected chart per built-in chart type:
     assert_snapshot(chart_elements.nth(1), name="st_builtin_chart-area_chart_themed")
     assert_snapshot(chart_elements.nth(12), name="st_builtin_chart-bar_chart_themed")
-    assert_snapshot(chart_elements.nth(23), name="st_builtin_chart-line_chart_themed")
+    assert_snapshot(chart_elements.nth(25), name="st_builtin_chart-line_chart_themed")
     assert_snapshot(
-        chart_elements.nth(34), name="st_builtin_chart-scatter_chart_themed"
+        chart_elements.nth(36), name="st_builtin_chart-scatter_chart_themed"
     )
diff --git a/lib/streamlit/elements/lib/built_in_chart_utils.py b/lib/streamlit/elements/lib/built_in_chart_utils.py
index 5e83d237feae..ba95e80c2502 100644
--- a/lib/streamlit/elements/lib/built_in_chart_utils.py
+++ b/lib/streamlit/elements/lib/built_in_chart_utils.py
@@ -122,6 +122,8 @@ def generate_chart(
     size_from_user: str | float | None = None,
     width: int | None = None,
     height: int | None = None,
+    # For bar charts only:
+    horizontal: bool = False,
 ) -> tuple[alt.Chart, AddRowsMetadata]:
     """Function to use the chart's type, data columns and indices to figure out the chart's spec."""
     import altair as alt
@@ -165,6 +167,18 @@ def generate_chart(
 
     # At this point, x_column is only None if user did not provide one AND df is empty.
 
+    if not horizontal:
+        x_encoding = _get_x_encoding(
+            df, x_column, x_from_user, x_axis_label, chart_type
+        )
+        y_encoding = _get_y_encoding(df, y_column, y_from_user, y_axis_label)
+    else:
+        # Handle horizontal bar chart - switches x and y encodings:
+        x_encoding = _get_y_encoding(df, y_column, y_from_user, x_axis_label)  # type: ignore[assignment]
+        y_encoding = _get_x_encoding(
+            df, x_column, x_from_user, y_axis_label, chart_type
+        )  # type: ignore[assignment]
+
     # Create a Chart with x and y encodings.
     chart = alt.Chart(
         data=df,
@@ -172,8 +186,8 @@ def generate_chart(
         width=width or 0,
         height=height or 0,
     ).encode(
-        x=_get_x_encoding(df, x_column, x_from_user, x_axis_label, chart_type),
-        y=_get_y_encoding(df, y_column, y_from_user, y_axis_label),
+        x=x_encoding,
+        y=y_encoding,
     )
 
     # Set up opacity encoding.
diff --git a/lib/streamlit/elements/vega_charts.py b/lib/streamlit/elements/vega_charts.py
index 4408eed345d7..1a71fadb013b 100644
--- a/lib/streamlit/elements/vega_charts.py
+++ b/lib/streamlit/elements/vega_charts.py
@@ -936,6 +936,7 @@ def bar_chart(
         x_label: str | None = None,
         y_label: str | None = None,
         color: str | Color | list[Color] | None = None,
+        horizontal: bool = False,
         width: int | None = None,
         height: int | None = None,
         use_container_width: bool = True,
@@ -1010,6 +1011,11 @@ def bar_chart(
               as the number of y values (e.g. ``color=["#fd0", "#f0f", "#04f"]``
               for three lines).
 
+        horizontal : bool
+            Determines the orientation of the chart:
+            * True: Displays the chart horizontally, with the x-axis and y-axis swapped.
+            * False: Displays the chart vertically (default).
+
         width : int or None
             Desired width of the chart expressed in pixels. If ``width`` is
             ``None`` (default), Streamlit sets the width of the chart to fit
@@ -1101,6 +1107,7 @@ def bar_chart(
             size_from_user=None,
             width=width,
             height=height,
+            horizontal=horizontal,
         )
         return cast(
             "DeltaGenerator",


Code review comments:
diff_hunk: @@ -165,15 +167,27 @@ def generate_chart(
 
     # At this point, x_column is only None if user did not provide one AND df is empty.
 
+    if not horizontal:
+        x_encoding = _get_x_encoding(
+            df, x_column, x_from_user, x_axis_label, chart_type
+        )
+        y_encoding = _get_y_encoding(df, y_column, y_from_user, y_axis_label)
+    else:
+        # Handle horizontal bar chart - switches x and y encodings:
+        x_encoding = _get_y_encoding(df, y_column, y_from_user, x_axis_label)  # type: ignore[assignment]
+        y_encoding = _get_x_encoding(
+            df, x_column, x_from_user, y_axis_label, chart_type
+        )  # type: ignore[assignment]
path: lib/streamlit/elements/lib/built_in_chart_utils.py
text: @user1:
This feels a bit hacky since it will assign `alt.X` to y and `alt.Y` to x. It probably works because they are extending the same base class without too many changes, but it could break if things change in Altair. Would it be possible to just change the parameters? 

```python
 x_encoding = _get_x_encoding(df, y_column, y_from_user, x_axis_label, chart_type) 
```

@author:
It does seem hacky, but it was the only solution I found to reliably create a horizontal bar chart 😓 
Just changing the param produced the below:
<img width=500 src=https://github.com/streamlit/streamlit/assets/63436329/3f392aa4-f8fd-4c53-8e26-38b4a310f442 />

@user1:
Oh, I believe this might be the reason why it's not working when you just change the parameters:

https://github.com/streamlit/streamlit/blob/a94106dcbe4f667b8bfec0140615bbd1d3938e69/lib/streamlit/elements/lib/built_in_chart_utils.py#L894-L897

It's making the wrong column ordinal 

@user1:
One alternative might be to replace `ChartType.BAR` with 

```
    VERTICAL_BAR = {"mark_type": "bar", "command": "bar_chart", "horizontal": False}
    HORIZONTAL_BAR = {"mark_type": "bar", "command": "bar_chart", "horizontal": True}
```

and then do this in `_get_x_encoding_type`:

```
if chart_type == ChartType.VERTICAL_BAR and not _is_date_column(df, x_column): 
     return "ordinal"
```

and this in `_get_y_encoding_type`:

```
if chart_type == ChartType.HORIZONTAL_BAR and not _is_date_column(df, y_column): 
     return "ordinal"
```

And just do the selection of `VERTICAL_BAR` vs `HORIZONTAL_BAR` type in the `bar_chart` command.