Page 1 of 1

MinVisibleSeriesValue & MaxVisibleSeriesValue

Posted: Fri Feb 20, 2009 8:24 pm
by 9532498
I have only 1 series assigned to an axis and I do the following:

CAxis CurrentAxis;

double fAxisMin = CurrentAxis.MinVisibleSeriesValue(false,0);
double fAxisMax = CurrentAxis.MaxVisibleSeriesValue(false,0);

Should I not get the Minimum and Maximum of the series Y values? (Its the first series added to the chart, so the Series Number is 0). Instead I'm getting some very small number of the order of E-15.

Is there any method (that belongs to CAxis) that will give me the number of series currently associated with an axis?

Thanks.

Posted: Mon Feb 23, 2009 11:45 am
by yeray
Hi nbp,

Maybe you don't need the MinVisibleSeriesValue method. You could try with the following:

Code: Select all

TChart1.Series(0).YValues.Minimum
TChart1.Series(0).YValues.Maximum
If this doesn't work either, please, could you send us a simple example project we can run "as-is" to reproduce the problem here? You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
nbp wrote:Is there any method (that belongs to CAxis) that will give me the number of series currently associated with an axis?
To do this, you should manually count the series linked to the custom axis. Something like this:

Code: Select all

counter = 0
For i = 0 To TChart1.SeriesCount - 1
  If TChart1.Series(i).VerticalAxisCustom = 0 Then
    counter = counter + 1
  End If
Next i