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

ECharts depends on sliders fix #1875

Merged
merged 4 commits into from
Jan 3, 2021
Merged

ECharts depends on sliders fix #1875

merged 4 commits into from
Jan 3, 2021

Conversation

MarcSkovMadsen
Copy link
Collaborator

Fixes #1874

@MarcSkovMadsen
Copy link
Collaborator Author

Test 1

This works because a ValueError is no longer raised.

pyecharts1

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).servable()

@codecov
Copy link

codecov bot commented Dec 29, 2020

Codecov Report

Merging #1875 (dd42c6a) into master (59d62df) will decrease coverage by 0.30%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1875      +/-   ##
==========================================
- Coverage   85.15%   84.85%   -0.31%     
==========================================
  Files         152      152              
  Lines       18791    18411     -380     
==========================================
- Hits        16001    15622     -379     
+ Misses       2790     2789       -1     
Impacted Files Coverage Δ
panel/tests/pane/test_echart.py 39.28% <10.00%> (-13.35%) ⬇️
panel/pane/echarts.py 82.69% <83.33%> (+9.81%) ⬆️
panel/config.py 45.23% <0.00%> (-5.98%) ⬇️
panel/io/callbacks.py 26.02% <0.00%> (-3.85%) ⬇️
panel/auth.py 35.06% <0.00%> (-3.02%) ⬇️
panel/pane/ipywidget.py 47.05% <0.00%> (-2.95%) ⬇️
panel/io/state.py 48.64% <0.00%> (-2.89%) ⬇️
panel/tests/template/test_manual.py 60.63% <0.00%> (-2.37%) ⬇️
panel/pane/plot.py 54.59% <0.00%> (-2.24%) ⬇️
panel/models/echarts.py 84.61% <0.00%> (-2.06%) ⬇️
... and 71 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b0a667...dd42c6a. Read the comment docs.

@MarcSkovMadsen MarcSkovMadsen changed the title ECharts model update fix ECharts model with sliders fix Dec 29, 2020
@MarcSkovMadsen MarcSkovMadsen changed the title ECharts model with sliders fix ECharts model depends on sliders fix Dec 29, 2020
@MarcSkovMadsen MarcSkovMadsen changed the title ECharts model depends on sliders fix ECharts depends on sliders fix Dec 29, 2020
@philippjfr philippjfr added type: bug Something isn't correct or isn't working and removed type: bug Something isn't correct or isn't working labels Jan 2, 2021
@philippjfr philippjfr merged commit cfbedcb into master Jan 3, 2021
@philippjfr philippjfr deleted the echarts-fix branch January 3, 2021 00:06
@philippjfr
Copy link
Member

Thanks @MarcSkovMadsen!

philippjfr added a commit that referenced this pull request Jan 14, 2021
* fixed

* Simplify ECharts updates

* Simplify further

* Fix flake

Co-authored-by: Marc Skov Madsen <masma@orsted.dk>
Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Echart pane doesn't fully work with pyechart
2 participants