posit-dev / posit-dev/py-shiny
Using pyecharts?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 135
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
Description
PyEcharts is a comprehensive interactive chart library built on Echarts which is open source and perfect for Shiny interactivity (I use R package echarts4r which wraps Echarts for R Shiny).
https://github.com/pyecharts/pyecharts
https://pyecharts.org/#/en-us/
I've tried using it with Shiny for python with no success as a plot, ui and ipywidget. Below is one attempt which isn't working.
from shiny import App, render, ui
from pyecharts.charts import Bar
from pyecharts import options as opts
from shinywidgets import output_widget, render_widget
app_ui = ui.page_fluid(
ui.layout_sidebar(
ui.panel_sidebar(
),
ui.panel_main(
ui.output_ui("echart_test"), #guessing here
)
)
)
def server(input, output, session):
@output
@render.ui
def echart_test():
bar = (
Bar()
.add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "袜子"])
.add_yaxis("商家A", [114, 55, 27, 101, 125, 27, 105])
.add_yaxis("商家B", [57, 134, 137, 129, 145, 60, 49])
.set_global_opts(title_opts=opts.TitleOpts(title="某商场销售情况"))
)
return bar.render() #guessing here too
app = App(app_ui, server)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided App, output, render.ui, shinywidgets, and render_widget reproducer, then compare its pyecharts usage with the linked pyecharts documentation. No repository file or test is named; done would require a defined, working integration path or a documented limitation for pyecharts with Shiny for Python.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100