GetSeriesMinMax min value isuue

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
lokesh
Posts: 45
Joined: Tue Feb 14, 2017 8:48 am

GetSeriesMinMax min value isuue

Post by lokesh » Thu Mar 16, 2017 8:58 pm

Hi,
I assigned an array of series points to a PointLineSeries in ViewXY. After that, I tried to get the min value from the Y axis using the below:

Code: Select all

double minVal = 0, maxVal = 0;
ownerView.YAxes[pls.AssignYAxisIndex].GetSeriesMinMax(out minVal, out maxVal);
Now, I wasn't sure if the minVal returned is correct in the above statement. So, I tried the following piece of code in watch

Code: Select all

seriePtsTemp.Select(pt => pt.Y).Min()
where seriePtsTemp is the array that I am assigning to the PointLineSeries and the value returned is much less that minVal.
As far as the maxVal is concerned, the value matches with Max() to the highest precision.

This happens only the 1st time when I am creating the PointLineSeries (I am adding the pls to the PointLineSeries list of ViewXY before running above statements).

Thanks.

Regards,
Lokesh

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

Re: GetSeriesMinMax min value isuue

Post by ArctionKestutis » Fri Mar 17, 2017 1:43 pm

Hi Lokesh,

Method return the total-Min and total-Max of ALL series that are using this axis, but in the xAxis range (Minimum-Maximum). If you getting higher value, maybe range is shorter. If you getting smaller value, maybe other series are assign to the same yAxis.

All the best.

lokesh
Posts: 45
Joined: Tue Feb 14, 2017 8:48 am

Re: GetSeriesMinMax min value isuue

Post by lokesh » Fri Mar 17, 2017 2:26 pm

Hi Dr.,
Thanks for the tip.
I wasn't setting the X-Axis range. I believe that should be the reason for unexpected behaviour and seems to be working fine after setting the X-Axis range.

Thanks again.

Regards,
Lokesh

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

Re: GetSeriesMinMax min value isuue

Post by ArctionKestutis » Mon Mar 20, 2017 11:49 am

The default range for xAxis is 0-100.

Post Reply