Menu

#2570 Annotation "Anchor to Data" when pointing breaks smallest number of changes rule

nextrelease
open
nobody
None
5
2024-06-17
2023-12-04
No

The Annotation "Anchor to Data" action when pointing breaks smallest number of changes rule. Any action should minimize the number of changes in the visible state, so the annotation should not move though it is now bound to the data.

Compare:

  1. add annotation
  2. anchor to data. Note the annotation does not move
  3. move the axes to verify it is attached.

To:

  1. add annotation to 0 to 100, 0 to 100 plot.
  2. point at 50,50.
  3. anchor to data. Note the annotation DOES move to somewhat arbitrary location

Discussion

  • Jeremy Faden

    Jeremy Faden - 2023-12-04

    It is acting like the anchor is the pointAtX,pointAtY point, not the xrange and yrange. This is a problem with documentation, and I don't think this has ever been precisely described. So I think this is a problem where the specification of the DasAnnotation object needs to be made more precise, first.

    Autoplot will be corrected by making the xrange and yrange be the same as the point, and then setting the emOffset to achieve the old location.

     
  • Jeremy Faden

    Jeremy Faden - 2023-12-09

    Looking over a couple of changes where I document the behavior, it seems clear that it was intended that the xrange, yrange box was intended to be the location for the annotation. This is also demonstrated by the strange behavior when "pointAt" was changed, because the annotation itself would move. This logic, deemed incorrect, has been in place for many years, but I think it is more describable, stable, and consistent with other anchorTypes to do it this way.

     
  • Jeremy Faden

    Jeremy Faden - 2024-06-17

    There's still a small jump with each operation, and maybe the "point at" logic should be to set the xrange and yrange to include the annotation itself, so that there is not a large em offset.

     
  • Jeremy Faden

    Jeremy Faden - 2024-06-17
     
MongoDB Logo MongoDB