Page 1 of 1

MaxVisibleSeriesValue and MinVisibleSeriesValue function

Posted: Thu Dec 18, 2003 11:40 am
by 9079459
the functions apparently returns min\max for all points, not for those being currently visible in chart

Posted: Thu Dec 18, 2003 1:23 pm
by Marc
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

Posted: Thu Dec 18, 2003 1:26 pm
by Marc
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

Posted: Thu Dec 18, 2003 2:40 pm
by 9079459
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

Posted: Fri Dec 19, 2003 11:46 am
by 9079459
still waiting...

Posted: Sun Dec 21, 2003 2:55 pm
by 9079459
still waiting...

Posted: Mon Dec 22, 2003 2:37 pm
by 9079459
still waiting...

Posted: Tue Dec 23, 2003 12:10 pm
by 9079459
still waiting...

Posted: Tue Dec 23, 2003 4:22 pm
by Marc
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