Jump to content
Software FX Community

Re: Having problems clearing Design time "random" values when starting real timechart


User (Legacy)

Recommended Posts

Michael, 

Thanks for the suggestions. I'm not sure that "hiding" the

data values will solve my problem as I need to eventually

save the chart data to a file and I don't want to include the

random initial values in the saved data file. I'm assuming even

if the data points are hidden, they still exist in the chart's data array.

I suppose I could hide them and then include an offset when I reference

the data during a SAVE operation, i.e. -> ValueEx(series, datapoint+20),

but I'd rather not have to do this.

Also, I can't get away with hiding one of the series and having the

other one visible.

The "compressing" I was referring to occurs when I specify a

a value of 0 for the Number of Values property in the chart's

Data/Behavior tab. What seems to be happening is that as I add

values to the chart in real time using:

OpenDataEx COD_VALUES Or COD_ADDPOINTS, 2, 1

The X axis automatically scales itself and the space between tick

marks on the X axis shrinks as I add data points. When I get to

20 data points the X axis "stablizes" itself and the chart tracks

smoothly. Oddly enough, if I include the code below prior to

starting the chart:

frmMain.TempPlot.OpenDataEx COD_VALUES Or COD_REMOVE, 2, 20

frmMain.TempPlot.CloseData COD_VALUES

The chart seems to "know" how to scale the X axis and this automatic

scaling effect does not occur over the first 20 values. However, the

side effect is that my first data point starts out at an X value of "21".

I think I'm close to solving this but there is still a small peice of the

puzzle

I'm missing here :-)

Gary

Software Engineering Manager, Sekidnko Inc.

gkercheck@yahoo.com

"Michael J. Archambault" wrote:

> Gary,

>

> hi, you can try looping through the x and y values, setting them to

> CHART_HIDDEN . This will make the values off the chart,

> and therefore not show up. This method, however, will leave 1 series

> present.

>

> Alternatively, you can remove the first, (and only upon startup)series,

> by

> performing an OpenDataEx-CloseData sequence specifying one less series, in

> this case, 0.

>

> hope that helps!

>

> michael

>

> ps. what did you mean by the chart "compressing" itself?

>

> Gary Kercheck wrote:

>

> > Hello,

> >

> > I'm using Chart FX98 build 4.0.15.1 with VB 6.0 SP3. I

> > have a simple, 2 series strip chart which seems to be running

> > fine with the exception that upon startup I seem to be unable

> > to excorcise the "random" values that Chart FX populates

> > the chart with during design time. This is a data logging application

> > where I can't "throw away" values so I'm using an unlimited style

> > real time chart. However, I do set the number of values property

> > to "20" in the Data/Behavior tab of the chart's design dialog so that

> > the X axis has a preset width and doesn't automatically "compress"

> > itself (which it did when I filled in "0" for this setting.)

> >

> > I've tried the following code (as well as the line that is commented

> > out) to get rid of these values but they seem to have no effect:

> >

> > frmMain.TempPlot.OpenDataEx COD_VALUES Or COD_REMOVE, 2, 20

> > frmMain.TempPlot.CloseData COD_VALUES

> > ' frmMain.TempPlot.ClearData (CD_INIVALUES)

> >

> > Any suggestions?

> >

> > Gary

> > gkercheck@yahoo.com

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...