10-05-2012 08:30 AM
Hi, all,
I am using Messurement studio 8 and VB 6.
when I want to show a curve on CWGraph, I found that not all the curve could be shown, what's the problem?
below is my test code:
Dim i%
Dim j%
j = 500
ReDim gEffStc21(1 To j)
ReDim gDateTimeStc2(1 To j)
For i = 1 To j
gDateTimeStc2(i) = i
gEffStc21(i) = 50
Next i
CWGraph1.ClearData
CWGraph1.Axes(1).Minimum = 1
CWGraph1.Axes(1).Maximum = j
CWGraph1.Plots(1).ChartXvsY gDateTimeStc2, gEffStc21
below is the screen shot:
How to resolve the problem?
Thanks.
10-05-2012 10:46 PM
Dear Luheroxx,
That's what is said in reference to the Measurement Studio UI (VB):
ChartXvsY Method. This method is similar to the PlotXvsY method, except that the system does not delete the previously plotted data until the amount stored is greater than the CWGraph.ChartLength property specifies.
ChartLength Property. Specifies how many points the graph stores when charting before it deletes old data. If the AutoScale property is enabled on the x axis, the system does not recalculate the chart length. Only the ChartY method supports automatic chart length calculation. The ChartXY and ChartXvsY methods do not.
Thus, the method ChartXvsY does not automatically calculate the length chart. And you have to explicitly specify the length chart:
CWGraph1.ChartLength = j
CWGraph1.Plots(1).ChartXvsY gDateTimeStc2, gEffStc21
Best Regards,
Vladimir Sotin
10-07-2012 09:44 AM
hi, there
It works,
Thanks so much.