Is is possible to find the screen location of a particular chart column?

WPF/SfChart/FastCandlestick series: I want to draw a vertical dotted line at the center point of the series. The line is no problem, and in general I can find the center of the enclosing grid, but what I can't account for so far are things like scroll bars and legend sizes that can vary on the fly, so my centerline is often off by a bar or two. Is there a way to get the left and right window co-ordinates of the actual charting area that the series is being drawn in? Either the corners of the chart drawing window, or the centers of the left and right most candlesticks, or the x coordinate of the centermost candlestick, any referent would do. 


1 Reply

AJ Arul Jenith Berkmans Syncfusion Team December 31, 2024 09:18 AM UTC

Hi Thomas Brand,

 

We have reviewed your query and would like to offer the following suggestions:

 

Suggestion 1: You can obtain the chart points using PointToValue and ValueToPoint methods based on the provided axis coordinates.

 

For more details, please refer to the following document:  Transform axis value to pixel value in WPF Chart Control | Syncfusion.

 

Suggestion 2: If your case to draw a dotted line at the center of a candlestick, we suggest using annotations. You can set the line annotation using axis coordinates.

 

For more information, please visit the following document: Annotations in WPF Charts control | Syncfusion

 

If you need any further assistance, feel free to ask. Thank you for your understanding.

 

Regards,

Arul Jenith B.


Loader.
Up arrow icon