Line Series cursor is behind

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

Lawrence_Jung
Posts: 14
Joined: Mon Jul 03, 2017 8:43 am

Line Series cursor is behind

Post by Lawrence_Jung » Tue Oct 31, 2017 1:45 am

hello, dear

I have to zoom in then vertical line series is behind, and i have to panning then see it

i don't want behind so i use to fit the vertical cursor, i want see the vertical cursor at always.

This is my codes

Code: Select all

void f_Charts_XaxisRangeChanged(object sender, RangeChangedEventArgs e)
        {
            //sender = xAxis
            if(multiChart == null || multiChart.ViewXY == null)
            {
                System.Diagnostics.Debug.WriteLine("[XaxisRangeChange]Chart is null.");
                return;
            }
            
            //ZoomIn check for auto fit to cursor
            if (!cursorFitFlag)
                return;
            if (multiChart.ViewXY.LineSeriesCursors[0].ValueAtXAxis < multiChart.ViewXY.LineSeriesCursors[1].ValueAtXAxis &&
                (e.Axis.Maximum < multiChart.ViewXY.LineSeriesCursors[1].ValueAtXAxis
                || e.Axis.Minimum > multiChart.ViewXY.LineSeriesCursors[0].ValueAtXAxis))
            {
                multiChart.ViewXY.LineSeriesCursors[1].ValueAtXAxis = e.Axis.Maximum - (e.Axis.Maximum / 10);
                multiChart.ViewXY.LineSeriesCursors[0].ValueAtXAxis = e.Axis.Minimum + (e.Axis.Minimum / 10);
                zoombar.SelectRange(e.Axis.Minimum, e.Axis.Maximum);
            }
            else if(multiChart.ViewXY.LineSeriesCursors[0].ValueAtXAxis > multiChart.ViewXY.LineSeriesCursors[1].ValueAtXAxis
                && (e.Axis.Maximum < multiChart.ViewXY.LineSeriesCursors[0].ValueAtXAxis
                || e.Axis.Minimum > multiChart.ViewXY.LineSeriesCursors[1].ValueAtXAxis))
            {
                multiChart.ViewXY.LineSeriesCursors[0].ValueAtXAxis = e.Axis.Maximum - (e.Axis.Maximum / 10);
                multiChart.ViewXY.LineSeriesCursors[1].ValueAtXAxis = e.Axis.Minimum + (e.Axis.Minimum / 10);
                zoombar.SelectRange(e.Axis.Minimum, e.Axis.Maximum);
            }
        }
so, how can i do. please

Best Regards.

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

Re: Line Series cursor is behind

Post by ArctionKestutis » Tue Oct 31, 2017 12:08 pm

LineSeriesCursors.Behind = false

Is this that you are looking?

Lawrence_Jung
Posts: 14
Joined: Mon Jul 03, 2017 8:43 am

Re: Line Series cursor is behind

Post by Lawrence_Jung » Wed Nov 01, 2017 12:26 am

Thanks for reply

I have mistake