Skip to content

The annotation arrow isn't rendered properly on load #992

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

Closed
fresheneesz opened this issue Sep 29, 2016 · 5 comments · Fixed by #2046
Closed

The annotation arrow isn't rendered properly on load #992

fresheneesz opened this issue Sep 29, 2016 · 5 comments · Fixed by #2046
Labels
bug something broken community community contribution

Comments

@fresheneesz
Copy link

Annotations seem to be missing the arrow head when the graph is first rendered. Strangely, once I either change the zoom, or click on one of the axes, the arrowhead changes to the correct display.

Here's what it looks like onload:
plotly annotation bug

This is what it looks like after doing one of those actions I mentioned:
plotly annotation bug correct

@etpinard
Copy link
Contributor

Yikes.

Can you share a reproducible example via codepen / jsFiddle /jsBin to help us debug? Thanks.

@fresheneesz
Copy link
Author

Here you go: http://codepen.io/anon/pen/XjakQy

@etpinard etpinard added the bug something broken label Sep 30, 2016
@etpinard
Copy link
Contributor

Strange. If the graph div is appended to the DOM before calling Plotly.newPlot, the arrow head is coloured properly as in http://codepen.io/etpinard/pen/vXajVP

@etpinard
Copy link
Contributor

etpinard commented Oct 14, 2016

Also to note, http://codepen.io/anon/pen/XjakQy works perfectly fine in FF 49.

The bug persists in Google Chrome 53.0.2785.143.

@etpinard etpinard added the community community contribution label Jan 13, 2017
@alexcjohnson
Copy link
Collaborator

Ha crazy - you can't call d3.select(node).style('stroke-width') or any other attribute for that matter before the element is part of the DOM. I guess it makes sense that d3 can't call getComputedStyle in this case (though apparently FF and Chrome disagree on whether it makes sense) even though node.style['stroke-width'] is available. Oh well, it was only a shortcut to read styles back anyway rather than just pass the style info in from above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken community community contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants