Diagram annotation vertical and horizontal alignments are broken

The horizontal left shows text on right side, and horizontal right shows text on the left side. They seem backwards.

The vertical top and bottom shows center.

    
    DiagramNodeAnnotation annotation = new DiagramNodeAnnotation()
        {
            Content = shapeText,
            Style = new AnnotationStyle()
            {
                Color = fontColor,
                Fill = "transparent",
                TextAlign = TextAlign.Center,
                Bold = true
            },
            VerticalAlignment = VerticalAlignment.Bottom,
            HorizontalAlignment = HorizontalAlignment.Left
        };

8 Replies

AR Aravind Ravi Syncfusion Team May 19, 2020 03:49 AM UTC

Hi Scott, 

By default, In the diagram the annotations gets aligned based on the control point. If we set horizontal alignment as left means then control point gets aligned on left side so that annotation gets rendered from left to right. So it looks like annotation aligned on right side, this is the default behavior of the annotation alignment. For vertical alignment also annotation aligned based on control point. 

Regards 
Aravind Ravi 



SP Scott Peal May 19, 2020 03:43 PM UTC

So the horizontal and vertical alignments are for the control point and not the actual annotation content? If that is the case, I recommend the class name be changed to help others understand. For example, ControlPointHorizontalAlignment.

Now I understand. Thanks again.


AR Aravind Ravi Syncfusion Team May 21, 2020 03:58 AM UTC

Hi Scott, 

We are validating your requirements and update you with more details on May 22nd 2014. 

Regards 
Aravind Ravi 



SP Scott Peal May 21, 2020 11:08 AM UTC

Please note, I also tried the vertical alignment in the node in order to put content at top. It also wasn't working for me.




AR Aravind Ravi Syncfusion Team May 23, 2020 01:32 PM UTC

Hi Scott, 

We are able to reproduce the reported issue at our end. We are validating the issue and update you with more details on May 26th 2020.  

Regards 
Aravind Ravi 



AR Aravind Ravi Syncfusion Team May 28, 2020 01:50 PM UTC

Hi Scott,    
    
Reported Issue : Annotation Horizontal and vertical alignments are aligned wrongly 
      
We can reproduce the issue and confirmed this as a defect. We have logged a defect report for this issue. We will fix this issue and provide the patch on June 16th ,2020 weekly patch release.    

    
Regards,    
Aravind Ravi 



AR Aravind Ravi Syncfusion Team June 17, 2020 04:14 PM UTC

Hi Scott, 
  
We deeply regret for the inconvenience caused. Unfortunately we are not able to include the fix for the issue in this week patch release. We will include the fix in our upcoming EJ2 patch release which is tentatively scheduled on June 23rd , 2020. 
  
  
Regards   
Aravind Ravi   




AR Aravind Ravi Syncfusion Team June 23, 2020 11:18 AM UTC

Hi Scott,  
    
We have fixed the reported issue and included it in our patch release (v18.1.59) which is rolled out successfully.   
   
Please upgrade to the latest version packages to resolve this issue.         
  
Regards,  
Aravind Ravi 



Loader.
Up arrow icon