# Chart elements

Source: https://docs.streamlit.io/develop/api-reference/charts

Streamlit's native charts cover nearly every visual a data app or dashboard
needs. The simple chart commands, like `st.line_chart` and `st.bar_chart`, give
you a chart from a dataframe in one line. For more control, use
[Vega-Lite](https://vega.github.io/vega-lite/) through Altair, or
[Apache ECharts](https://echarts.apache.org/) for chart types like sankey
diagrams, gauges, and network graphs. Streamlit also supports Plotly,
Matplotlib, [deck.gl](https://github.com/uber/deck.gl) maps, and Mermaid and
Graphviz diagrams. Plotly and Matplotlib are optional packages; install them
with `pip install "streamlit[charts]"`.

> **Tip**
>
> Not sure which command to use? See [Choosing and using charts](https://docs.streamlit.io/develop/concepts/design/charts). Rebuilding visuals from a Power BI or Tableau dashboard? See [Coming from a BI tool?](https://docs.streamlit.io/develop/concepts/design/dashboards#coming-from-a-bi-tool) for a mapping of BI visuals, filters, and drill-downs to Streamlit.

## Simple chart elements

**[Simple area charts](https://docs.streamlit.io/develop/api-reference/charts/st.area_chart)**: Display an area chart.

```python
st.area_chart(my_data_frame)
```

**[Simple bar charts](https://docs.streamlit.io/develop/api-reference/charts/st.bar_chart)**: Display a bar chart.

```python
st.bar_chart(my_data_frame)
```

**[Simple line charts](https://docs.streamlit.io/develop/api-reference/charts/st.line_chart)**: Display a line chart.

```python
st.line_chart(my_data_frame)
```

**[Simple scatter charts](https://docs.streamlit.io/develop/api-reference/charts/st.scatter_chart)**: Display a scatter chart.

```python
st.scatter_chart(my_data_frame)
```

**[Scatterplots on maps](https://docs.streamlit.io/develop/api-reference/charts/st.map)**: Display a map with points on it.

```python
st.map(my_data_frame)
```

## Advanced chart elements

**[Altair](https://docs.streamlit.io/develop/api-reference/charts/st.altair_chart)**: Display a chart using the Altair library.

```python
st.altair_chart(my_altair_chart)
```

**[ECharts](https://docs.streamlit.io/develop/api-reference/charts/st.echarts_chart)**: Display an interactive Apache ECharts chart, including sankey, gauge, network, and other chart types.

```python
st.echarts_chart(my_echarts_option)
```

**[Vega-Lite](https://docs.streamlit.io/develop/api-reference/charts/st.vega_lite_chart)**: Display a chart using the Vega-Lite library.

```python
st.vega_lite_chart(my_vega_lite_chart)
```

**[Plotly](https://docs.streamlit.io/develop/api-reference/charts/st.plotly_chart)**: Display an interactive Plotly chart.

```python
st.plotly_chart(my_plotly_chart)
```

**[PyDeck](https://docs.streamlit.io/develop/api-reference/charts/st.pydeck_chart)**: Display a chart using the PyDeck library.

```python
st.pydeck_chart(my_pydeck_chart)
```

**[Mermaid chart](https://docs.streamlit.io/develop/api-reference/charts/st.mermaid_chart)**: Display a Mermaid diagram.

```python
st.mermaid_chart("graph LR\n  A --> B")
```

**[GraphViz](https://docs.streamlit.io/develop/api-reference/charts/st.graphviz_chart)**: Display a graph using the dagre-d3 library.

```python
st.graphviz_chart(my_graphviz_spec)
```

**[Matplotlib](https://docs.streamlit.io/develop/api-reference/charts/st.pyplot)**: Display a matplotlib.pyplot figure.

```python
st.pyplot(my_mpl_figure)
```
