# Render Header level interactive charts for dataframes

**URL:** <https://discuss.streamlit.io/t/render-header-level-interactive-charts-for-dataframes/49048>\
**Category:** Custom Components\
**Tags:** pandas, streamlit-echarts, dataframe\
**Created:** [August 10, 2023, 10:09am UTC](https://discuss.streamlit.io/t/render-header-level-interactive-charts-for-dataframes/49048 "2023-08-10T10:09:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun\_Kalyan](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/varun_kalyan/32/30561_2.png) [@Varun\_Kalyan](https://discuss.streamlit.io/u/Varun_Kalyan)\
**Post date:** [August 10, 2023, 10:09am UTC](https://discuss.streamlit.io/t/render-header-level-interactive-charts-for-dataframes/49048/1 "2023-08-10T10:09:48Z")

</div>

Hey lit fam,

I’ve been working on kaggle for a while and wondered how can we acheive the header level charts in streamlit.  
The charts take aggregate of the corresponding column data and renders/picks suitable charts depending on the datatype.  
Then the charts glides over the dataframe.  
Refer screenshots below.

 ![Screenshot 2023-08-10 123337](https://global.discourse-cdn.com/streamlit/original/3X/e/b/ebf0e5531d0e8f595f8e49ea3180c971b7de4d9f.png)

Also came across a similar functionality on [akkio.com](http://akkio.com)

 ![image](https://global.discourse-cdn.com/streamlit/original/3X/7/a/7ad108ffc67c70a09f4d554ecd1cd2e6f8f75f24.png)

**would love a feature/component/workaround for this!**

---

<div class="post-metadata">

**Author:** ![blackary](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/blackary/32/47725_2.png) [@blackary](https://discuss.streamlit.io/u/blackary)\
**Post date:** [August 10, 2023, 1:40pm UTC](https://discuss.streamlit.io/t/render-header-level-interactive-charts-for-dataframes/49048/2 "2023-08-10T13:40:55Z")

</div>

I think this would be an excellent component, but I don’t know of one currently. I would love to know if something like this already exists.

In the meantime, you can create something vaguely like this manually, like this:

https://playground.streamlit.app/~/+/?embedded=true&q=0014e9

---

<div class="post-metadata">

**Author:** ![Varun\_Kalyan](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/varun_kalyan/32/30561_2.png) [@Varun\_Kalyan](https://discuss.streamlit.io/u/Varun_Kalyan)\
**Post date:** [August 11, 2023, 8:19am UTC](https://discuss.streamlit.io/t/render-header-level-interactive-charts-for-dataframes/49048/4 "2023-08-11T08:19:44Z")

</div>

Hello @blackary ,  
Could you think of the way to make the charts scrollable. Say my df has 16 columns?  
Then the graphs become all clumsy.  
Thanks, this approach of yours helped.  
Let me know if you have any more tips to build on top of this.

---

<div class="post-metadata">

**Author:** ![blackary](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/blackary/32/47725_2.png) [@blackary](https://discuss.streamlit.io/u/blackary)\
**Post date:** [August 11, 2023, 2:41pm UTC](https://discuss.streamlit.io/t/render-header-level-interactive-charts-for-dataframes/49048/5 "2023-08-11T14:41:09Z")

</div>

I think this is possible with CSS, but I haven’t been able to figure out a great way to do it yet without making the whole page extra wide. This is a relevant issue that you could 👍 and comment on it you would like. Perhaps someone else can suggest a solution.

> <https://github.com/streamlit/streamlit/issues/2313>
>
> \_(Note, you don't have to fill out every section here. They're just here for gui…dance. That said, nicely detailed feature requests are more likely to get eng attention sooner)\_
> 
> \### Problem
> 
> When I call \`st.dataframe(df)\` on a dataframe that has too many columns to fit into the width of the page, the \`st.dataframe\` container allows me to scroll sideways to see the other columns.
> However, when I attempt to display multiple graphs side-by-side using \`st.columns\`, the graphs in the columns get cut by the vertical edges of the column space. Is there a way to allow the columns to scroll horizontally to solve this problem?
> 
> \### Solution
> 
> \*\*MVP:\*\* What's the smallest possible solution that would get 80% of the problem out of the way?
> Either of the following two options would work:
> 
> 1. Allow unsafe style injection in \`st.columns\` via (say) \`\*\*kwargs\`. This way, I could inject \`style="overflow-x:scroll"\` with minimal code change in streamlit infra.
> 
> 2. Allow unsafe javascript execution after the page has loaded (this will probably make a ton of other people happy, too)
> 
> \*\*Possible additions:\*\* What are other things that could be added to the MVP over time to make it better?
> 
> \*\*Preferred solution:\*\* If you don't like the MVP above, tell us why, and what you'd like done instead.
> 
> \### Additional context
> 
> Add any other context or screenshots about the feature request here. For example, did this FR come from https://discuss.streamlit.io or another site? Link the original source here!
> 
> https://discuss.streamlit.io/t/is-there-a-way-to-horizontally-scroll-containers/6737
> 
> \---
> 
> 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.\*\*

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [February 7, 2024, 2:41pm UTC](https://discuss.streamlit.io/t/render-header-level-interactive-charts-for-dataframes/49048/6 "2024-02-07T14:41:15Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
