MinVisibleSeriesValue & MaxVisibleSeriesValue

TeeChart for ActiveX, COM and ASP
Post Reply
nbp
Newbie
Newbie
Posts: 83
Joined: Mon Sep 18, 2006 12:00 am

MinVisibleSeriesValue & MaxVisibleSeriesValue

Post by nbp » Fri Feb 20, 2009 8:24 pm

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.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Feb 23, 2009 11:45 am

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply