Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

CWGraph-Cannot show all the data

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:

无标题.png

How to resolve the problem?

Thanks.

0 Kudos
Message 1 of 3
(6,657 Views)

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

Message 2 of 3
(6,646 Views)

hi, there

It works,

Thanks so much.

0 Kudos
Message 3 of 3
(6,633 Views)