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

Refactor handling of Plotly updates #2251

Merged
merged 1 commit into from
Apr 26, 2021
Merged

Refactor handling of Plotly updates #2251

merged 1 commit into from
Apr 26, 2021

Conversation

philippjfr
Copy link
Member

Refactors the Plotly pane a little bit and ensures that JS events trigger updates to plot.

Part of the problem here is that all property updates are handled via the same update path so to avoid running this multiple times the actual rendering is triggered by a change to the _render_count. However a user triggering updates manually, e.g. via JS will not know to increment the render count. Therefore we set a timeout that ensures that if _render_count hasn't been incremented within 250 ms of the an update to one of the properties then it is incremented automatically.

Fixes #2239

@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #2251 (92cc835) into master (74088e7) will decrease coverage by 0.00%.
The diff coverage is 95.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2251      +/-   ##
==========================================
- Coverage   83.64%   83.64%   -0.01%     
==========================================
  Files         183      183              
  Lines       21894    21900       +6     
==========================================
+ Hits        18313    18318       +5     
- Misses       3581     3582       +1     
Impacted Files Coverage Δ
panel/pane/plotly.py 91.42% <95.65%> (+0.89%) ⬆️
panel/io/reload.py 64.36% <0.00%> (-2.30%) ⬇️

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 74088e7...92cc835. Read the comment docs.

@philippjfr philippjfr merged commit 6a0c8c8 into master Apr 26, 2021
@philippjfr philippjfr deleted the plotly_updates branch April 26, 2021 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plotly_link.ipynb: Nothing happens when clicking the buttons
1 participant