Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echart pane doesn't fully work with pyechart #1874

Closed
jbogaardt opened this issue Dec 29, 2020 · 0 comments · Fixed by #1875
Closed

Echart pane doesn't fully work with pyechart #1874

jbogaardt opened this issue Dec 29, 2020 · 0 comments · Fixed by #1875
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@jbogaardt
Copy link

Echart pane doesn't behave correctly when wrapping a pyechart object + interacting wigh widgets. Refer to this discourse discussion.

Description of expected behavior and the observed behavior

I expect this to work, and it initializes, but upon update it returns an error.

from pyecharts.charts import Bar
import panel as pn
pn.extension('echarts')


bar1 = pn.widgets.IntSlider(start=1, end=100, value=50)
bar2 = pn.widgets.IntSlider(start=1, end=100, value=50)

@pn.depends(bar1.param.value, bar2.param.value)
def plot(bar1, bar2):
    my_plot= (Bar()
        .add_xaxis(['Bar1', 'Bar2'])
        .add_yaxis('Values', [bar1, bar2])
    )
    return pn.pane.ECharts(my_plot, width=500, height=250)
pn.Row(pn.Column(bar1, bar2), plot)

Stack traceback and/or browser JavaScript console output

ValueError: expected an element of Dict(String, Any), got <pyecharts.charts.basic_charts.bar.Bar object at 0x7ffada0b5910>

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Jan 2, 2021
@philippjfr philippjfr added this to the v0.11.0 milestone Jan 2, 2021
@philippjfr philippjfr modified the milestones: v0.11.0, v0.10.3 Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants