Min/Max values of visible XAxis

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
djl
Posts: 8
Joined: Tue Apr 30, 2013 11:47 am

Min/Max values of visible XAxis

Post by djl » Fri Oct 17, 2014 3:34 pm

Hi,

i wonder where I can find the minimum and maximum values of the currently visible XAxis.

With YAxis it's posible to use Chart.ViewXY.YAxes[0].Minimum/.Maximum.
But with XAxis I get Minimum and Maximum of all available values.

I use ScrollPosition and SetRange to change the visible XAxis and want to position a cursor within the visible Range.

Is there a chance?

Regards
Dirk

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Min/Max values of visible XAxis

Post by ArctionPasi » Mon Oct 20, 2014 5:23 am

xAxis.Minimum and Maximum give the current range for you.

Code: Select all

//Set range
m_chart.ViewXY.XAxes[0].SetRange(3.0, 5.5); 

//Set the nearest point from middle of range, cursor has SnapToPoints enabled 
m_chart.ViewXY.LineSeriesCursors[0].ValueAtXAxis = (m_chart.ViewXY.XAxes[0].Minimum +  m_chart.ViewXY.XAxes[0].Maximum)/2.0; 
Axis ranges set
Axis ranges set
AxisRangesSet.jpg (144.11 KiB) Viewed 6310 times
LightningChart Support Team, PT

djl
Posts: 8
Joined: Tue Apr 30, 2013 11:47 am

Re: Min/Max values of visible XAxis

Post by djl » Mon Oct 20, 2014 11:41 am

!!! Please delete this :firing: thread !!!

You are absolutely right, sorry for bothering you...
It was my fault, unable to position a cursor to one third of screen :oops: .

Thanks for great and fast support !!!
Dirk

Post Reply