Reputation: 61
this code is in example
var lineAnnotation4 = new LineAnnotation();
lineAnnotation4.Type = LineAnnotationType.Horizontal;
lineAnnotation4.Y = 2;
lineAnnotation4.Color = OxyColors.Gold;
lineAnnotation4.MaximumX = 4;
lineAnnotation4.Text = "Horizontal";
plotModel1.Annotations.Add(lineAnnotation4);
What I was wondering.
The Text position is always below the line.
like this..
Is there a way to position text above the line?
like this..
thanks.
Upvotes: 2
Views: 2233
Reputation: 917
Try lineAnnotation4.TextVerticalAlignment = VerticalAlignment.Top
Edit:
Seems rather counter intuitive, but you actually need to specify lineAnnotation4.TextVerticalAlignment = VerticalAlignment.Bottom;
Upvotes: 1