GitHunt
LX

lxfu1/streamlit-charts

A Streamlit component to render Ant Design Charts.

Streamlit Charts

Ant Design Charts is AntV React component library, Simple and easy to use React chart library.

This project was created to allow us to render charts in streamlit, live demo.

examples
npm Version
npm Download
GitHub stars
npm License

Installation

pip3 install streamlit-charts

Usage

import streamlit as st
from streamlit_charts import charts

 options = {
    "height": 400,
    "data": [
        { "genre": "Sports", "sold": 275 },
        { "genre": "Strategy", "sold": 115 },
        { "genre": "Action", "sold": 120 },
        { "genre": "Shooter", "sold": 350 },
        { "genre": "Other", "sold": 150 },
    ],
    "xField": 'genre',
    "yField": 'sold',
    "colorField": "genre",
    "style": {
      "radiusTopLeft": 10,
      "radiusTopRight": 10,
    },
  }

  charts(type="Column", options=options, key="streamlit-charts")

example

API

Now, There is only one API for streamlit-charts, named charts, see the type | options in Ant Design Charts.

Property Description Type Default
type the chart type of the charts, eg: Line、Column、Bar、Pie... Str Column
options the options for the visualization Options -

Development

  • Building frontend code by running npm run start in fold streamlit_charts/frontend.
  • Run the example by running streamlit run streamlit_charts/__init__.py with _RELEASE = False.

License

MIT@lxfu1.

Languages

Python91.4%HTML4.3%TypeScript4.3%

Contributors

MIT License
Created December 20, 2023
Updated September 17, 2025
lxfu1/streamlit-charts | GitHunt