ECharts for Shiny
Project description
py-shiny-echarts: ECharts for Shiny for Python
Shiny for Python bindings for ECharts JS
Note
This package is still in an early state.
Installation
pip install git+https://github.com/eodaGmbH/py-shiny-echarts
Basic usage
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)
shiny run docs/examples/getting_started/basic_usage.py --reload
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shinyecharts-0.1.0.tar.gz
(346.2 kB
view hashes)
Built Distribution
shinyecharts-0.1.0-py3-none-any.whl
(348.7 kB
view hashes)
Close
Hashes for shinyecharts-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8db25f84df8c938a89b18af2cd96eaac16a18b8b8ac0c9c1b4c819e0a61ca60 |
|
MD5 | 10adbfe7b5b6ed673aca16b4164e19ba |
|
BLAKE2b-256 | bf0eeaeda5d6e0316f34d0965fa97febd3f0441a1770685f011cb44325f2c194 |