<h1 align="center">
<b>Streamlit Charts</b>
</h1>
<div align="center">
[Ant Design Charts](https://ant-design-charts.antgroup.com/) 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](https://ant-design-charts.streamlit.app/).
![examples](https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*11uNQrnKdFoAAAAAAAAAAAAADmJ7AQ/original)
![npm Version](https://img.shields.io/npm/v/@ant-design/charts)
![npm Download](https://img.shields.io/npm/dm/@ant-design/charts)
[![GitHub stars](https://img.shields.io/github/stars/ant-design/ant-design-charts)](https://github.com/ant-design/ant-design-charts/stargazers)
[![npm License](https://img.shields.io/npm/l/@ant-design/charts.svg)](https://www.npmjs.com/package/@ant-design/charts)
</div>
## Installation
```
pip3 install streamlit-charts
```
## Usage
```py
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")
```
<img src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*aPxqSpQcsUQAAAAAAAAAAAAADmJ7AQ/original" width="640" alt="example">
## API
Now, There is only one API for `streamlit-charts`, named `charts`, see the `type | options` in [Ant Design Charts](https://ant-design-charts.antgroup.com/).
| 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](https://github.com/lxfu1).
Raw data
{
"_id": null,
"home_page": "https://github.com/lxfu1/streamlit-charts",
"name": "streamlit-charts",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "antv,charts,Ant Design Charts,streamlit-component,streamlit-charts",
"author": "lxuf1",
"author_email": "954055752@qq.com",
"download_url": "https://files.pythonhosted.org/packages/78/96/890a1eca0b96786715279fb90954a92ec5f48a2855006cc6f23a31f5a988/streamlit-charts-0.1.1.tar.gz",
"platform": null,
"description": "<h1 align=\"center\">\n <b>Streamlit Charts</b>\n</h1>\n\n<div align=\"center\">\n\n[Ant Design Charts](https://ant-design-charts.antgroup.com/) is AntV React component library, Simple and easy to use React chart library.\n\nThis project was created to allow us to render charts in streamlit, [live demo](https://ant-design-charts.streamlit.app/).\n\n![examples](https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*11uNQrnKdFoAAAAAAAAAAAAADmJ7AQ/original)\n![npm Version](https://img.shields.io/npm/v/@ant-design/charts)\n![npm Download](https://img.shields.io/npm/dm/@ant-design/charts)\n[![GitHub stars](https://img.shields.io/github/stars/ant-design/ant-design-charts)](https://github.com/ant-design/ant-design-charts/stargazers)\n[![npm License](https://img.shields.io/npm/l/@ant-design/charts.svg)](https://www.npmjs.com/package/@ant-design/charts)\n\n</div>\n\n\n## Installation\n\n```\npip3 install streamlit-charts\n```\n\n\n## Usage\n\n```py\nimport streamlit as st\nfrom streamlit_charts import charts\n\n options = {\n \"height\": 400,\n \"data\": [\n { \"genre\": \"Sports\", \"sold\": 275 },\n { \"genre\": \"Strategy\", \"sold\": 115 },\n { \"genre\": \"Action\", \"sold\": 120 },\n { \"genre\": \"Shooter\", \"sold\": 350 },\n { \"genre\": \"Other\", \"sold\": 150 },\n ],\n \"xField\": 'genre',\n \"yField\": 'sold',\n \"colorField\": \"genre\",\n \"style\": {\n \"radiusTopLeft\": 10,\n \"radiusTopRight\": 10,\n },\n }\n\n charts(type=\"Column\", options=options, key=\"streamlit-charts\")\n```\n\n<img src=\"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*aPxqSpQcsUQAAAAAAAAAAAAADmJ7AQ/original\" width=\"640\" alt=\"example\">\n\n\n## API\n\nNow, There is only one API for `streamlit-charts`, named `charts`, see the `type | options` in [Ant Design Charts](https://ant-design-charts.antgroup.com/).\n\n| Property | Description | Type | Default |\n| -------- | --------------------------------------------------------------------------------------------------------------- | --------------------- | ------- |\n| type | the chart type of the charts, eg: `Line\u3001Column\u3001Bar\u3001Pie...` | `Str` | `Column` |\n| options | the options for the visualization | `Options` | - |\n\n\n## Development\n\n- Building frontend code by running `npm run start` in fold `streamlit_charts/frontend`.\n- Run the example by running `streamlit run streamlit_charts/__init__.py` with `_RELEASE = False`.\n\n\n## License\n\nMIT@[lxfu1](https://github.com/lxfu1).\n",
"bugtrack_url": null,
"license": "",
"summary": "Render Ant Design Charts in Streamlit",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/lxfu1/streamlit-charts"
},
"split_keywords": [
"antv",
"charts",
"ant design charts",
"streamlit-component",
"streamlit-charts"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "88ec14700756c56146bd442b564b8902a13dbada34beeafbd6f230975918f69c",
"md5": "12c31c24c754246aa2dcd374a11efa73",
"sha256": "cf8fb19344604b84f15b2a29a10f6c2cb328e562e30f76bd89341fd1448eafbd"
},
"downloads": -1,
"filename": "streamlit_charts-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "12c31c24c754246aa2dcd374a11efa73",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4851,
"upload_time": "2023-12-21T08:07:49",
"upload_time_iso_8601": "2023-12-21T08:07:49.541117Z",
"url": "https://files.pythonhosted.org/packages/88/ec/14700756c56146bd442b564b8902a13dbada34beeafbd6f230975918f69c/streamlit_charts-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7896890a1eca0b96786715279fb90954a92ec5f48a2855006cc6f23a31f5a988",
"md5": "e789a1ec3cbe149c09b731b65e3984fb",
"sha256": "c174ab2b98d86a829c4cd33b7927c496ffa2d55c17efc18b82c9b22ef3db495e"
},
"downloads": -1,
"filename": "streamlit-charts-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "e789a1ec3cbe149c09b731b65e3984fb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4995,
"upload_time": "2023-12-21T08:07:52",
"upload_time_iso_8601": "2023-12-21T08:07:52.149591Z",
"url": "https://files.pythonhosted.org/packages/78/96/890a1eca0b96786715279fb90954a92ec5f48a2855006cc6f23a31f5a988/streamlit-charts-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-21 08:07:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lxfu1",
"github_project": "streamlit-charts",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "streamlit-charts"
}