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

Support annotation lines connecting all annotation container faces #1208

Closed
bpostlethwaite opened this issue Nov 30, 2016 · 5 comments
Closed
Assignees
Labels
feature something new

Comments

@bpostlethwaite
Copy link
Member

Support annotation connector arrow at any of the 4 annotation walls. For example:

untitled presentation

@bpostlethwaite bpostlethwaite added the feature something new label Nov 30, 2016
@alexcjohnson
Copy link
Collaborator

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!

@alexcjohnson alexcjohnson self-assigned this Dec 20, 2016
@alexcjohnson
Copy link
Collaborator

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
Copy link
Contributor

Then it seems to me like we should define the anchor point BEFORE rotating the text.

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 showarrow true and false annotations.

@alexcjohnson
Copy link
Collaborator

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

@alexcjohnson
Copy link
Collaborator

closed by #1265

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

No branches or pull requests

3 participants