http://www.bos.at/downloads/Chart.jpg
Hello Experts!!
I have some troubles with my Series which are shown above...
I capture some SensorData and want to show them on the chart. I capture over 30 secs. but I see only values till approx. 21 secs??!! Where are the remaining values??
I controlled the values before which are added to the chart...yes there are values over 30 secs.
Other questions:
+) Where can I define how many values (secs on the x-axis) I want to see??
+) Is it possible to click on the chart and get back time back of the cursor-position?? For example when the cursor clicks at 3.6 sec of the chart, then I want to get back the time := 3.6 sec.
Excellent it will be when I also get the values of Series1 and Series2 at 3.6!!
Bye
Thomas[/url]
Problems with Series...
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Thomas,
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
I can see your problem in the image but we need to reproduce it here to be able to help you. Could you please send us a simple example project we can run "as-is" to reproduce the problem here? You can add random data to the project series with a timer or whatever you fell like to imitate the original project behavior.I have some troubles with my Series which are shown above...
I capture some SensorData and want to show them on the chart. I capture over 30 secs. but I see only values till approx. 21 secs??!! Where are the remaining values??
I controlled the values before which are added to the chart...yes there are values over 30 secs.
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Please read Tutorial 4 - Axis Control for this. You'll find the tutorials at TeeChart's program group.+) Where can I define how many values (secs on the x-axis) I want to see??
To achieve that you'll need to do something as the interpolating example I posted here.+) Is it possible to click on the chart and get back time back of the cursor-position?? For example when the cursor clicks at 3.6 sec of the chart, then I want to get back the time := 3.6 sec.
Excellent it will be when I also get the values of Series1 and Series2 at 3.6!!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hello Narcis!!
I'm not able to reproduce this phenomenon with random values. When I do this it seems that I got all values in the chat but I can't understand why I have the result with my values.
I'm loading my values from a filestream to a memorystream and from there in the teechart...so I have to get to the bottom of it.
Bye
Thomas
I'm not able to reproduce this phenomenon with random values. When I do this it seems that I got all values in the chat but I can't understand why I have the result with my values.
I'm loading my values from a filestream to a memorystream and from there in the teechart...so I have to get to the bottom of it.
Bye
Thomas
Hi, Thomas.
How do you populate the series ? By using AddXY method ? If this is the case, do you clear the series prior to loading data from it? I'd use the following approach:
How do you populate the series ? By using AddXY method ? If this is the case, do you clear the series prior to loading data from it? I'd use the following approach:
Code: Select all
Series1.Clear;
// add data by using AddXY method
// series horizontal axis maximum/minumum are
// calculated from XValues maximum and minimum value
Series1.GetHorizAxis.Automatic := True;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Hello Marjan,
thanks a lot for your fast reply!! Thats excellent support!!
First of all I init my Chart on Form Show...
then I clear my Series
When I load my values in the memory-stream than I begin to read the time and the both data...
For explanation: the lElements stores the heap of sensorData (and the values makes sense when I take a measure over approx. 30 secs and I got 277 measure points --> I take a measure point each 0.1 sec.!!)
thanks a lot for your fast reply!! Thats excellent support!!
First of all I init my Chart on Form Show...
Code: Select all
displaySensorData.AddSeries(Series1);
displaySensorData.AddSeries(Series2);
displaySensorData.BottomAxis.Labels := true;
displaySensorData.BottomAxis.DateTimeFormat := 'nn:ss';
displaySensorData.BottomAxis.Increment := DateTimeStep[dtOnesecond]*(ZEITRAUM DIV 4);
Series1.XValues.DateTime := true;
Series2.XValues.DateTime := true;
Code: Select all
Series1.Clear;
Series2.Clear;
For explanation: the lElements stores the heap of sensorData (and the values makes sense when I take a measure over approx. 30 secs and I got 277 measure points --> I take a measure point each 0.1 sec.!!)
Code: Select all
for li := 1 to lElements do begin
fMStream.Read(lTime, SizeOf(lTime));
fMStream.Read(lAccelX, SizeOf(lAccelX));
fMStream.Read(lAccelY, SizeOf(lAccelY));
aSeries1.AddXY(lTime, lAccelX);
aSeries2.AddXY(lTime, lAccelY);
end;
Hi.
The code looks fine to me. Looking at your original chart image it looks to me series x values (lTime values) are fine (minimum 0s, maximum 30s). But I'm not sure about series y values (in your case lAccelX, lAccelY). I'd check if all lAccelX and AccelY values are in the same magnitude and if not, set vertical axis logarithmic scale to true. I'm guessing here, but judging from your image it appears lAccelX and lAccelY values are very close to zero after 21s.
The code looks fine to me. Looking at your original chart image it looks to me series x values (lTime values) are fine (minimum 0s, maximum 30s). But I'm not sure about series y values (in your case lAccelX, lAccelY). I'd check if all lAccelX and AccelY values are in the same magnitude and if not, set vertical axis logarithmic scale to true. I'm guessing here, but judging from your image it appears lAccelX and lAccelY values are very close to zero after 21s.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Problem solved!!
Hello Marjan again!!
Problem solved....the bug were incorrect data in my filestream!!
Thanks for your input!!
One last question...Narcis wrote above that I find the tutorial 4 at TeeCharts's program group. I don't find such a group at your homepage...can you send me a link??
Bye
Thomas
Problem solved....the bug were incorrect data in my filestream!!
Thanks for your input!!
One last question...Narcis wrote above that I find the tutorial 4 at TeeCharts's program group. I don't find such a group at your homepage...can you send me a link??
Bye
Thomas