Pre loader

How to get YAxis value?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies