> For the complete documentation index, see [llms.txt](https://xplain-data.gitbook.io/community-edition/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xplain-data.gitbook.io/community-edition/python-services-overview/app-building/streamlit-examples/bar-chart-and-button.md).

# Bar Chart and Button

**App View:** <br>

<figure><img src="/files/gEAWJ8UgUe2sbh8Hd9ai" alt=""><figcaption></figcaption></figure>

**Code:**&#x20;

```python
import streamlit as st
import xplain
#import plotly.express as px

x = xplain.Xsession()
x.startup('sDefault_withQCost_sample_5')
x.run({
    "method": "deleteRequest",
    "requestName": "test"
})

df = x.open_attribute(object_name="Product", 
    dimension_name="Automat", 
    attribute_name="Automat",
    request_name="test")
fig = st.bar_chart(df, x='Automat', y='# Product')
st.title="This is a minimal streamlit app powerd by Xplain Data"
#st.plotly_chart(fig)
if st.button('Say hello'):
    st.write('hello world!')
```

**Packages** that should be entered in the pip install field: `streamlit, xplain`
