Page 1 of 1

GetSeriesMinMax min value isuue

Posted: Thu Mar 16, 2017 8:58 pm
by lokesh
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

Re: GetSeriesMinMax min value isuue

Posted: Fri Mar 17, 2017 1:43 pm
by ArctionKestutis
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.

Re: GetSeriesMinMax min value isuue

Posted: Fri Mar 17, 2017 2:26 pm
by lokesh
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

Re: GetSeriesMinMax min value isuue

Posted: Mon Mar 20, 2017 11:49 am
by ArctionKestutis
The default range for xAxis is 0-100.