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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

I need to get Yaxis value of mouse with using OnClick Event. If I use CursorModifier I can get only one value of “primary” or first declared axis. So even this axis’s Visibility Property set as Collapsed I get is’s Y Value, and if displayed axes and “primary” have a different scale (and they have), I get a very wrong value. How can I get Y value of displayed axes or of all axes?

Version
4.2.2
  • You must to post comments
0
0

Hi Ivan

To get the Y-value on an axis on mouse down, please use the following code:

 Point mousePoint;    
 double yValue = YAxis.GetDataValue(mousePoint.Y);

That literally is it. It will work for visible, or invisible axis.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.