shinyecharts


Nameshinyecharts JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryECharts for Shiny
upload_time2024-02-09 14:23:50
maintainer
docs_urlNone
authorStefan Kuethe
requires_python>=3.9,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # py-shiny-echarts: ECharts for Shiny for Python

[![Release](https://img.shields.io/github/v/release/eodaGmbH/py-shiny-echarts)](https://img.shields.io/github/v/release/eodaGmbH/py-shiny-echarts)
[![pypi](https://img.shields.io/pypi/v/shinyecharts.svg)](https://pypi.python.org/pypi/shinyecharts)
[![Build status](https://img.shields.io/github/actions/workflow/status/eodaGmbH/py-shiny-echarts/pytest.yml?branch=main)](https://img.shields.io/github/actions/workflow/status/eodaGmbH/py-shiny-echarts/pytest.yml?branch=main)
[![License](https://img.shields.io/github/license/eodaGmbH/py-shiny-echarts)](https://img.shields.io/github/license/eodaGmbH/py-shiny-echarts)

[Shiny for Python](https://shiny.posit.co/py/) bindings for [ECharts JS](https://echarts.apache.org/)

## Note

This package is still in an early state.

## Installation

```bash
# Stable
pip install shinyecharts

# Dev
pip install git+https://github.com/eodaGmbH/py-shiny-echarts
```

## Basic usage

```python
from pandas import DataFrame

# Must always be imported, otherwise App is not found
from shiny.express import ui
from shinyecharts import Chart, InitOptions
from shinyecharts.options import Line
from shinyecharts.renderer import ChartRenderer

init_options = InitOptions(width=600, height=400, renderer="canvas")

data = DataFrame(
    [[0, 1, 2, 3], [1, 4, 5, 6], [2, -2, 4, 9]],
    columns=["a", "b", "c", "d"],
)


lines = (
    Line(x="a", y="b", tooltip=dict(trigger="axis"), legend=dict())
    .add_series("c")
    .add_series("d")
)


@ChartRenderer
def render_dataset():
    return Chart(init_options, data=data).set_option(lines)
```

```bash
shiny run docs/examples/getting_started/basic_usage.py --reload
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "shinyecharts",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Stefan Kuethe",
    "author_email": "stefan.kuethe@eoda.de",
    "download_url": "https://files.pythonhosted.org/packages/12/6b/758449c3065569b95190f3b7337bc5e17350bfc64aef5e421b33478a3e92/shinyecharts-0.1.1.tar.gz",
    "platform": null,
    "description": "# py-shiny-echarts: ECharts for Shiny for Python\n\n[![Release](https://img.shields.io/github/v/release/eodaGmbH/py-shiny-echarts)](https://img.shields.io/github/v/release/eodaGmbH/py-shiny-echarts)\n[![pypi](https://img.shields.io/pypi/v/shinyecharts.svg)](https://pypi.python.org/pypi/shinyecharts)\n[![Build status](https://img.shields.io/github/actions/workflow/status/eodaGmbH/py-shiny-echarts/pytest.yml?branch=main)](https://img.shields.io/github/actions/workflow/status/eodaGmbH/py-shiny-echarts/pytest.yml?branch=main)\n[![License](https://img.shields.io/github/license/eodaGmbH/py-shiny-echarts)](https://img.shields.io/github/license/eodaGmbH/py-shiny-echarts)\n\n[Shiny for Python](https://shiny.posit.co/py/) bindings for [ECharts JS](https://echarts.apache.org/)\n\n## Note\n\nThis package is still in an early state.\n\n## Installation\n\n```bash\n# Stable\npip install shinyecharts\n\n# Dev\npip install git+https://github.com/eodaGmbH/py-shiny-echarts\n```\n\n## Basic usage\n\n```python\nfrom pandas import DataFrame\n\n# Must always be imported, otherwise App is not found\nfrom shiny.express import ui\nfrom shinyecharts import Chart, InitOptions\nfrom shinyecharts.options import Line\nfrom shinyecharts.renderer import ChartRenderer\n\ninit_options = InitOptions(width=600, height=400, renderer=\"canvas\")\n\ndata = DataFrame(\n    [[0, 1, 2, 3], [1, 4, 5, 6], [2, -2, 4, 9]],\n    columns=[\"a\", \"b\", \"c\", \"d\"],\n)\n\n\nlines = (\n    Line(x=\"a\", y=\"b\", tooltip=dict(trigger=\"axis\"), legend=dict())\n    .add_series(\"c\")\n    .add_series(\"d\")\n)\n\n\n@ChartRenderer\ndef render_dataset():\n    return Chart(init_options, data=data).set_option(lines)\n```\n\n```bash\nshiny run docs/examples/getting_started/basic_usage.py --reload\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "ECharts for Shiny",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ab59349d26419d6a04dcb20145208f7f7a7390dcacff4b2c1d23b063cc6247e",
                "md5": "a80c101e8936dba7f84e110eb145bb33",
                "sha256": "399b844dab221bbd42403cfae12219842944d7bb3cd0e6124a7d7c8d01e03f6e"
            },
            "downloads": -1,
            "filename": "shinyecharts-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a80c101e8936dba7f84e110eb145bb33",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 348697,
            "upload_time": "2024-02-09T14:23:47",
            "upload_time_iso_8601": "2024-02-09T14:23:47.443462Z",
            "url": "https://files.pythonhosted.org/packages/9a/b5/9349d26419d6a04dcb20145208f7f7a7390dcacff4b2c1d23b063cc6247e/shinyecharts-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "126b758449c3065569b95190f3b7337bc5e17350bfc64aef5e421b33478a3e92",
                "md5": "63fc270efdf291cc69c82b7a45252d71",
                "sha256": "861ad93ba4960125c5870d2669bb7d6a93dcce3c74fe33cf9581850d816f43d3"
            },
            "downloads": -1,
            "filename": "shinyecharts-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "63fc270efdf291cc69c82b7a45252d71",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 346211,
            "upload_time": "2024-02-09T14:23:50",
            "upload_time_iso_8601": "2024-02-09T14:23:50.864362Z",
            "url": "https://files.pythonhosted.org/packages/12/6b/758449c3065569b95190f3b7337bc5e17350bfc64aef5e421b33478a3e92/shinyecharts-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-09 14:23:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "shinyecharts"
}
        
Elapsed time: 0.51493s