Keeping Cursors Always Visible

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

plotter
Posts: 41
Joined: Thu Apr 06, 2017 2:29 am

Keeping Cursors Always Visible

Post by plotter » Mon May 01, 2017 9:29 pm

Hi,

I would love the option to have my cursors always visible, regardless of the scaling and axis panning, etc.
I need to make this a feature that can be turned on/off.

It seems to me that this would be great useful functionality to be built in to the product. something like LineSeriesCursor.AlwaysVisible=true/false...
When the view is panned cursor is constrained to the appropriate min/max values...
if set to true, the cursors are immediately automatically readjusted if they are not visible...

Until then, what is the best or easiest way to do this?

Thanks as always for the great support...

ArctionKestutis
Posts: 386
Joined: Mon Mar 14, 2016 9:22 am

Re: Keeping Cursors Always Visible

Post by ArctionKestutis » Tue May 02, 2017 8:51 am

Hi,

In our eyes LineSeriesCursor's position ( .ValueAtXaxis) is most important property for the cursor. Therefore, all rendering is tuned to maintain that position accurately. In contrast, you are asking quite an opposite thing. Fortunately, there is an easy way for you to achieve the desired effect. You just need to subscribe to AxisX.RangeChanged event and modify Cursor's ValueAtXAxis however you like it (whenever you zoom or pan this event will be fired). In addition, there is Cursor.PositionChanged event, where you can prevent cursor movement by mouse outside particular range.

Hope this helps. All the best.

plotter
Posts: 41
Joined: Thu Apr 06, 2017 2:29 am

Re: Keeping Cursors Always Visible

Post by plotter » Tue May 02, 2017 11:40 am

Yes, I agree with your cursor logic, however I am using a zoom bar implementation and need only to (optionally) trigger this behavior selectively when the range is initially change from the zoom bar, and it will be disabled for range adjustments in the detail chart.

I can also show the cursors in the zoom bar (and in the zoom bar range band) when the feature is enabled...

Thank You for your prompt response.