MaxVisibleSeriesValue and MinVisibleSeriesValue function

TeeChart for ActiveX, COM and ASP
Post Reply
nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

MaxVisibleSeriesValue and MinVisibleSeriesValue function

Post by nefis » Thu Dec 18, 2003 11:40 am

the functions apparently returns min\max for all points, not for those being currently visible in chart

Marc
Site Admin
Site Admin
Posts: 1219
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Thu Dec 18, 2003 1:23 pm

Hello,

I can't reproduce that here. Please could you confirm results with the following code:

- Place 1 TChart, 1 ChartPageNavigator and 2 Labels on a Form and paste in this code:

Private Sub Form_Load()
ChartPageNavigator1.Chart = TChart1
TChart1.Page.MaxPointsPerPage = 15
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Series(0).Marks.Visible = True
TChart1.Series(0).FillSampleValues 225
End Sub

Private Sub TChart1_OnAfterDraw()
Label1.Caption = TChart1.Series(0).MaxVisibleValue(1)
Label2.Caption = TChart1.Series(0).MinVisibleValue(1)
End Sub

The Labels should match up with the highest and lowest values of the Marks.

Regards,
Marc Meumann
Steema Support

Marc
Site Admin
Site Admin
Posts: 1219
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Thu Dec 18, 2003 1:26 pm

As a followup... I mistook the methods you had tested, but the result here is the same with the equivalent Axes methods:

Code: Select all

Private Sub TChart1_OnAfterDraw()
  Label1.Caption = TChart1.Axis.Left.MaxVisibleSeriesValue(True, 0)
  Label2.Caption = TChart1.Axis.Left.MinVisibleSeriesValue(True, 0)
End Sub
Regards,
Marc Meumann
Steema Support

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Post by nefis » Thu Dec 18, 2003 2:40 pm

hello Marc,

let's changit in the way i use it in my app and the results are totaly different:

Code: Select all

Private Sub Form_Load()
  TChart1.Aspect.View3D = False
  TChart1.AddSeries scLine
  TChart1.Series(0).FillSampleValues 1000
  TChart1.Axis.Bottom.Automatic = False
  TChart1.Axis.Bottom.Maximum = 1000
  TChart1.Axis.Bottom.Minimum = 900
End Sub

Private Sub TChart1_OnAfterDraw()
  Label1.Caption = "MinVisibleSeriesValue: " & TChart1.Series(0).MinVisibleValue(1)
  Label2.Caption = "MaxVisibleSeriesValue: " & TChart1.Series(0).MaxVisibleValue(1)
End Sub

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Post by nefis » Fri Dec 19, 2003 11:46 am

still waiting...

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Post by nefis » Sun Dec 21, 2003 2:55 pm

still waiting...

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Post by nefis » Mon Dec 22, 2003 2:37 pm

still waiting...

nefis
Newbie
Newbie
Posts: 62
Joined: Wed Oct 22, 2003 4:00 am
Location: chicago

Post by nefis » Tue Dec 23, 2003 12:10 pm

still waiting...

Marc
Site Admin
Site Admin
Posts: 1219
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Dec 23, 2003 4:22 pm

Hello,

Your code seems to work ok here. It tells me the correct Max Y value and Min Y value on the visible Chart. If I zoom-in or drag-scroll the result updates itself accordingly, correctly.

I can't explain what might be happening in your Chart. The code is straightforward and there is little room for ambiguity unless you are running it alongside other factors not mentioned in your post. Let us know if there are any other clues in your particular setup.

Steema Support:
Please note that Steema do not commit to reply to support posts except on Pro-support forums. Whilst we endeavour to reply to as many requests for help as possible, you may experience delays or 'non-reply' on this forum. I'd also like to take the opportunity to express that we welcome any participation/response from other customers to help overall inertia.

With thanks.

Marc Meumann
Steema Support

Post Reply