question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ploty.js in Shadow DOM hover flicker

See original GitHub issue

When Plotly.js is rendered inside of a ShadowDOM, the hover elements rapidly draw, clear, and redraw causing a flickering effect on mousemove events under specific conditions.

Demonstration in codepen

And a GIF hover-flicker

For comparision, here is the same example as above using the Light DOM: Demonstration in codepen

And a GIF expected-hover

When it comes to support for Plotly.js in Shadow DOM, there are other issues in addition to this one but, as demonstrated in the first code pen, there are workable fixes I can make as a user in most cases (i.e. the styling inside of the template…) but this particular issue is not so easily worked around as a user.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexandergerbercommented, Jan 4, 2021

I would say it is exactly the same issue. I checked out your pull request and can try if it fixes the problem for me. When I have tested your changes I’ll report my findings.

1reaction
alexandergerbercommented, Jan 4, 2021

@dbluhm Yes. I am trying to use plotly within a Web Component. Outside ShadowDOM elements it works correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly.js in ShadowDOM
Hack to correctly style plotly inside of Shadow DOM. -->. 9. <style>. 10 .js-plotly-plot ... .js-plotly-plot .plotly a:hover {. 26. text-decoration:none;.
Read more >
Plotly flickers - plotly.js
When I click on “EDIT CHART”, that version of the graphic is smoothly interactive. What am I missing?
Read more >
Adding CSS & JS and Overriding the Page-Load Template
Learn how to add custom CSS and JS to your app as well as how to customize the HTML title, meta tags, and...
Read more >
Encapsulating D3.js Charts as Python Dash Components
Tutorials and resources on encapsulating D3.js graphs in Dash-friendly React components. Includes two sample components: a D3.js network graph and a D3.js ......
Read more >
Indicator | Dash for Python Documentation
style (dict; optional): Style to apply to the root component element. Dash Python > Dash DAQ > Indicator.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found