SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

0
0

Hi

I want to set multi TextAnnotations on the top left of the chart surface like as bmp.
So I use the HorizontalAnchorPoint and VerticalAnchorPoint to set top left of the chart but how can I set these property in multi TextAnnotations?
This is my code:

            txtAnno1.Text = "Hellow World1!";
            txtAnno1.Foreground = new SolidColorBrush(Colors.Blue);
            txtAnno1.HorizontalAnchorPoint = HorizontalAnchorPoint.Left;
            txtAnno1.VerticalAnchorPoint = VerticalAnchorPoint.Top;
            Surface.Annotations.Add(txtAnno1);

            txtAnno2.Text = "Hellow World2!";
            txtAnno2.Foreground = new SolidColorBrush(Colors.Red);
            txtAnno2.HorizontalAnchorPoint = HorizontalAnchorPoint.Left;
            txtAnno2.VerticalAnchorPoint = VerticalAnchorPoint.Top;
            Surface.Annotations.Add(txtAnno2);

Please help me.

Thanks

Version
5.4.0
Images
  • You must to post comments
0
0

Hi Bruce,

Thanks for your inquiry.
You can combine TextAnnotations into one CompositeAnnotation and place it as a single element. Please take a look at the corresponding documentation article for more info:
https://www.scichart.com/documentation/win/current/webframe.html#The%20CompositeAnnotation%20Type.html

Hope this helps.

With best regards,
Oleksandr

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.