Annotation Coordinate

Hi, 

I would like to know how to fix the Annotation position shifted. After close and reopen the candlestick sfchart loaded with more datas than the time that I saved Annotation coordinate. Could you give me a example of solution.


3 Replies

DD Devakumar Dhanapoosanam Syncfusion Team August 30, 2022 12:05 PM UTC

Hi Komatora,


We would like to let you know that when add annotation and set position using X1 and Y1 properties with CoordinateUnit as Axis it will position based on axis at respective values, when change or modify data it will position at the same location as the axis value.


If you want to show an annotation in a fixed position, you can use the annotation with CoordinateUnit as Pixels and position the annotation based on the pixel values.


Please refer the below link for more details.

https://help.syncfusion.com/wpf/charts/annotations#positioning-the-annotation


Incase if we misunderstood your requirement, could you please share more details of your requirement in any pictorial or video representation with example, which will be helpful for us to understand and provide you a better solution at earliest.


Regards,

Devakumar D



KO komatora September 7, 2022 03:01 PM UTC

Hello Devakumar,

Attached pls find the program for show you the situation. There is a button ("Load PM Data" to simulate close the program and save the Vertical Line's coorindate 'X' to file,  then reopen the program and reload the Vertical Line with coorindate 'X' ), after you pressed it the Updated data will be load to the StockPriceCollection. As the result the Vertical Line will be shifted from the date 10/8/2022 9:32:00 to 11/8/2022 9:31:00. Could you advise the solution?

Regard,

Andrew


Attachment: AnnotationSample_4408ecbf.zip


DD Devakumar Dhanapoosanam Syncfusion Team September 8, 2022 04:17 PM UTC

Hi Komatora,


We have checked the provided sample and VerticalLineAnnotation X1 with double value(3730.1426601739518), and you have using the DateTimeCategoryAxis as the PrimaryAxis. We would like to let you know that DateTimeCategoryAxis is index based and it does consider the value.


At initial StockPriceCollection data using customers_am.xml has start date from {7/25/2022 2:22:00 PM} and while click Load PM data with customers_pm.xml have start date from {7/26/2022 2:21:00 PM}, hence the VerticalLineAnnotation position shift 1minute while load it using customers_pm.xml with DateTimeCategoryAxis.


We would like to suggest using the DateTimeAxis as the PrimaryAxis instead of DateTimeCategoryAxis to position the annotation using the DateTime value instead of index.


Please refer the below link for more details and let us know if you need any further assistance.

https://help.syncfusion.com/wpf/charts/axis#datetimeaxis


Regards,

Devakumar D


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Loader.
Up arrow icon