Author |
Topic  |
|
marco
18 Posts |
Posted - 30 Oct 2003 : 16:03:42
|
Hi,
I'm trying to show some data in REAL TIME using your multiline graph. I'm currently using the trial version (my company is in the process of buying the redistributable licence). I'm using a cut-down version of your example. I want the graph to display 10 sec of data at a time. I'm sending an array of 6 doubles (for six traces) every 1/4 sec aprox. in my AddNewPoints method which also calls this.updateDraw(). The problem is that 1)the grid inside the graph gets wider and narower, 2)I cant get the graph to display 10seconds exacly. Also, how would I go about initializing an EMPTY dataset. Right now, I have to init the dataset with dummy values, which messes with the start of the graph until the dummy values completely go off the graph.
I know this is alot of questions at once, but I've been fighting with this since yesterday and I thought I'd get them all out :).
Thanks in advance,
Marco |
|
quinncurtis
1164 Posts |
Posted - 30 Oct 2003 : 16:44:22
|
Just in case you misunderstood the licensing, you can't use the Redistributable license in combination with the Trial software. If you purchase a Redistributable license you must also have the Developer license.
It sounds like you are trying to use the auto-scaling features, yet you want a fixed frame, at least for the start of the graph.
So explicity set x-scale for a range of 0-10. Also set the y-scale if you want that fixed. Update the graph for 10 seconds (or 40 updates in your case) without changing the scale (do not call any of the auto-scale or auto-axis functions). This elimiates having to initialize a graph with dummy values.
After 10 seconds worth of updates you can either rescale the x-axis explicity with every update (i.e. x-scale 0.25 - 10.25), or you can use the auto-scaling routines using the AUTOAXES_NEAR or AUTOAXES_EXACT values. The DataLogger example in the ChartTabDemo use the auto-axis functions in combination with allowing a variable starting point.
xValues = Dataset1.GetTimeXData(); nNumPnts = Dataset1.GetNumberDatapoints(); pTransform1.AutoScale(Dataset1,ChartObj.AUTOAXES_NEAR, ChartObj.AUTOAXES_NEAR); if (fixedStartTimeFlag) pTransform1.SetTimeScaleStart(xValues[0]); // peg start of graph at start of data else // Set a 100 point view into data pTransform1.SetTimeScaleStart(Dataset1.GetTimeXDataValue(Dataset1.GetNumberDatapoints()-100));
|
 |
|
marco
18 Posts |
Posted - 30 Oct 2003 : 17:37:58
|
thanks for the prompt reply, I'll try that in the morning.
regards,
marco |
 |
|
|
Topic  |
|
|
|