Skip to content

Support annotation lines connecting all annotation container faces #1208

Closed

Description

@bpostlethwaite

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

untitled presentation

Activity

  1. alexcjohnson commented on Nov 30, 2016

    @alexcjohnson
    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!

  2. self-assigned this
    on Dec 20, 2016
  3. alexcjohnson commented on Dec 20, 2016

    @alexcjohnson
    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?

  4. etpinard commented on Dec 20, 2016

    @etpinard
    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.

  5. alexcjohnson commented on Dec 20, 2016

    @alexcjohnson
    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
  6. alexcjohnson commented on Jan 21, 2017

    @alexcjohnson
    Collaborator

    closed by #1265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions