# reflex-echarts
A Reflex wrapper for
[echarts-for-react](https://www.npmjs.com/package/echarts-for-react) library.
## Installation
```bash
pip install reflex-echarts
```
## Usage
See [echarts_demo/echarts_demo.py](echarts_demo/echarts_demo/echarts_demo.py) for a
working example.
Props are based on the `echarts-for-react` library, so please refer to the
documentation there for further explanation.
## Themes
Themes can be set by passing a `theme` prop to the `ECharts` component.
To load custom themes, provide the JS code that ultimately calls `echarts.registerTheme` as
a string to the `register_theme_code` prop (this cannot be a State Var).
## Limitations
* Event handling is not yet implemented.
* Inline functions for formatters and data key extraction is not implemented.
Due to how the chart `option` is serialized as JSON, there is not a clean way
to pass inline functions from the Python backend to the Javascript frontend.
* All chart types are available, which increases the bundle size of the application.
There is not currently a mechanism to only include the chart types which are used.
* Cannot figure out how to load external themes from a JS file...
Raw data
{
"_id": null,
"home_page": null,
"name": "reflex-echarts",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "reflex, reflex-custom-components",
"author": null,
"author_email": "Masen Furer <m_github@0x26.net>",
"download_url": "https://files.pythonhosted.org/packages/30/7e/2d74b3f028e59199e1bbb938aa31cdcb73aebeac6964c33bee09cd8290e2/reflex_echarts-0.1.0.tar.gz",
"platform": null,
"description": "# reflex-echarts\n\nA Reflex wrapper for\n[echarts-for-react](https://www.npmjs.com/package/echarts-for-react) library.\n\n## Installation\n\n```bash\npip install reflex-echarts\n```\n\n## Usage\n\nSee [echarts_demo/echarts_demo.py](echarts_demo/echarts_demo/echarts_demo.py) for a\nworking example.\n\nProps are based on the `echarts-for-react` library, so please refer to the\ndocumentation there for further explanation.\n\n## Themes\n\nThemes can be set by passing a `theme` prop to the `ECharts` component.\n\nTo load custom themes, provide the JS code that ultimately calls `echarts.registerTheme` as\na string to the `register_theme_code` prop (this cannot be a State Var).\n\n## Limitations\n\n* Event handling is not yet implemented.\n* Inline functions for formatters and data key extraction is not implemented.\n Due to how the chart `option` is serialized as JSON, there is not a clean way\n to pass inline functions from the Python backend to the Javascript frontend.\n* All chart types are available, which increases the bundle size of the application.\n There is not currently a mechanism to only include the chart types which are used.\n* Cannot figure out how to load external themes from a JS file...\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Reflex Wrapper for echarts-for-react library.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/masenf/react-echarts"
},
"split_keywords": [
"reflex",
" reflex-custom-components"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "52b6ba8130dea4e5ce168c846cc11605681adb81f0f7eb1c0101824d4b07bdb7",
"md5": "505c3801cf23c34b70b81a98afb3ddc1",
"sha256": "2130d1b4f5ec9e2d8969b6c20cc462f439f6cd40e6061cae518a68f282f78bbd"
},
"downloads": -1,
"filename": "reflex_echarts-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "505c3801cf23c34b70b81a98afb3ddc1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3171,
"upload_time": "2025-02-12T23:43:47",
"upload_time_iso_8601": "2025-02-12T23:43:47.078432Z",
"url": "https://files.pythonhosted.org/packages/52/b6/ba8130dea4e5ce168c846cc11605681adb81f0f7eb1c0101824d4b07bdb7/reflex_echarts-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "307e2d74b3f028e59199e1bbb938aa31cdcb73aebeac6964c33bee09cd8290e2",
"md5": "bf25e5bd24f18bb18af6ca786975bb97",
"sha256": "504b9a536256ade9587448afbb0fc6b2317c55f83ec9724cb11677bc52e4fd9d"
},
"downloads": -1,
"filename": "reflex_echarts-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "bf25e5bd24f18bb18af6ca786975bb97",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 31225,
"upload_time": "2025-02-12T23:43:48",
"upload_time_iso_8601": "2025-02-12T23:43:48.749447Z",
"url": "https://files.pythonhosted.org/packages/30/7e/2d74b3f028e59199e1bbb938aa31cdcb73aebeac6964c33bee09cd8290e2/reflex_echarts-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-12 23:43:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "masenf",
"github_project": "react-echarts",
"github_not_found": true,
"lcname": "reflex-echarts"
}