Nevron Forum

Cursor Min/Max Value?

https://www.nevron.com/Forum/Topic5040.aspx

By Teddy Lambropoulos - Tuesday, March 29, 2011

Hi all,

I have a question regarding data cursors on an axis. I have a set of 4 cursors on my NChart. There are two on the X Axis and two on the Y Axis. The cursors move by a mouse move event. When I move these cursors I am constantly updating a text box with the value of the cursor. I noticed that even if I drag my mouse/cursor off of the NChart the text box is still updating which means the cursor is still moving somewhere "off" the NChart where I can not see it. I want to be able to set a maximum and minimum value for where the cursor can travel on each axis. I do not want the cursors to get "lost" off of the chart anywhere. Is there a simple way to do this?

If I was not clear and you need me to describe my situation in more detail I can.

By Nevron Support - Tuesday, March 29, 2011

Hi Teddy,

Yes - you can apply a value snapper to the cursor:

someCursor.ValueSnapper = new NAxisRulerClampSnapper();

the Interactivity\Tools\Data Cursor Tool example also shows how different snappers work (you can snap to major / minor ticks, min max value and ruler range).