You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support annotation lines connecting all annotation container faces #1208
Relatedly, controlling the shape of this line - along the lines of scatter line.shape, I'd like to have the options 'hv' (horizontal line coming out of the note, making a right angle and continuing vertically to the arrowhead), 'vh', 'hvh', 'vhv', and possibly some variants of spline. spline itself doesn't mean anything with just two points, but we should invent modes you might call 'hspline' and 'vspline', ie the start and end of the line are horizontal (or vertical) and they're connected with a cubic spline. Those could be nice additions to line.shape for scatter as well, then we could remake the sources tab from shareplot as a regular plotly plot!
Trying to work out how this plays with rotated text: I don't like it, but I think we need very different behaviors with and without arrows.
Without an arrow, when we specify an anchor point as one of the edges or corners (which we already support so we can't really change this), we do the rotation and THEN set the anchor point based on the new bounding box. So for example if you say the anchor is left middle and the position is (0,0), no matter what rotation you specify the text will always be to the right of x=0 and centered on y=0.
But this doesn't seem to make sense when there's an arrow, and its tail is attached to the text box. Then it seems to me like we should define the anchor point BEFORE rotating the text. So if you specify left middle, the tail will always be attached next to the beginning of the words, even if you rotate it 180 degrees so this is actually the right side.
If we only ever rotated by multiples of 90 degrees we could keep the no-arrow behavior with arrows... but if you rotate by some other angle that way, the arrow tail will not in general be attached to the text at all, it'll be floating out in space.
So, I would be ok with having (slightly) different behavior for showarrow true and false annotations.
Great, I'll go with it, thanks!
Adding an option to either define the anchor before or after rotating the text might end up make things too confusing (and hard to implement).
Right - there would be uses for it, but
using the existing mode with showarrow is too prone to breaking, doesn't offer any new functionality that you would actually want.
the new behavior without showarrow could be handy, but you could get it (with some extra flexibility) by turning showarrow on and making the arrow invisible
Activity
alexcjohnson commentedon Nov 30, 2016
Relatedly, controlling the shape of this line - along the lines of scatter
line.shape, I'd like to have the options'hv'(horizontal line coming out of the note, making a right angle and continuing vertically to the arrowhead),'vh','hvh','vhv', and possibly some variants of spline. spline itself doesn't mean anything with just two points, but we should invent modes you might call'hspline'and'vspline', ie the start and end of the line are horizontal (or vertical) and they're connected with a cubic spline. Those could be nice additions toline.shapefor scatter as well, then we could remake the sources tab from shareplot as a regular plotly plot!alexcjohnson commentedon Dec 20, 2016
Trying to work out how this plays with rotated text: I don't like it, but I think we need very different behaviors with and without arrows.
Without an arrow, when we specify an anchor point as one of the edges or corners (which we already support so we can't really change this), we do the rotation and THEN set the anchor point based on the new bounding box. So for example if you say the anchor is left middle and the position is (0,0), no matter what rotation you specify the text will always be to the right of x=0 and centered on y=0.
But this doesn't seem to make sense when there's an arrow, and its tail is attached to the text box. Then it seems to me like we should define the anchor point BEFORE rotating the text. So if you specify left middle, the tail will always be attached next to the beginning of the words, even if you rotate it 180 degrees so this is actually the right side.
If we only ever rotated by multiples of 90 degrees we could keep the no-arrow behavior with arrows... but if you rotate by some other angle that way, the arrow tail will not in general be attached to the text at all, it'll be floating out in space.
@etpinard @cldougl does that make sense? Any thoughts?
etpinard commentedon Dec 20, 2016
That makes the most sense to me.
Adding an option to either define the anchor before or after rotating the text might end up make things too confusing (and hard to implement).
So, I would be ok with having (slightly) different behavior for
showarrowtrue and false annotations.alexcjohnson commentedon Dec 20, 2016
Great, I'll go with it, thanks!
Right - there would be uses for it, but
showarrowis too prone to breaking, doesn't offer any new functionality that you would actually want.showarrowcould be handy, but you could get it (with some extra flexibility) by turningshowarrowon and making the arrow invisiblealexcjohnson commentedon Jan 21, 2017
closed by #1265