Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

1

0

Hello, I have a polar chart in my wpf application and I want to get data value from pixel coordinates, once the user has clicked on scichart surface. This is what I tried:

This code gets mouse point coordinates, then it converts pixel coordinates to polar, and then (a,b) data are obtained with GetCurrentCoordinateCalculator().GetDataValue(), but a and b have some strange values. I’ve tried just the opposite (from data value to pixel coordinate using GetCoordinate()), but it still doesn’t work. Any ideas? Is it possible to get data from pixel coordinates in polar chart?

If I get you properly you want get data value from pixel coordinate. So you just have to Get mouse point according to SciChart and using MainGrid translate it according to ModifierSurface. You don’t have to calculate Polar calculations.

I made some code for you according to your sample to demonstrate how it should be.

I have implemented your code, but I still have strange values. In fact, I get the same X value in “mousePointAccordingToCoordinates” and in “a” variable. It seems that GetDataValue() has no effect. Also, when I insert a CursorModifier, I get the same value as well (it seems that this value is x pixel coordinate instead of dataseries value, see attached picture) Am I doing somethign wrong? Is there anything else to do?