Hi,
Does anyone know of a decent library for generating graphs on the screen that will work with xHarbour/FWH ?
I'm looking for something that can handle about 250,000 data points on the Y axis so scaling/scrolling would need to be available.
Graph Functions Library
- Jeff Barnes
- Posts: 933
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Re: Graph Functions Library
I know RMChart, good for working, various forms of graphs and examples
to Download
http://pt.softpicks.net/software/Progra ... -23958.htm
http://www.xharbour.com/xhc/index.asp?p ... =dl&id=137
Examples
viewtopic.php?f=3&t=24267
http://www.fivewin.com.br/exibedicas.asp?id=751
http://www.pctoledo.com.br/forum/viewto ... f=2&t=7463
for studies
http://www.purebasic.fr/english/viewtopic.php?t=31091
to Download
http://pt.softpicks.net/software/Progra ... -23958.htm
http://www.xharbour.com/xhc/index.asp?p ... =dl&id=137
Examples
viewtopic.php?f=3&t=24267
http://www.fivewin.com.br/exibedicas.asp?id=751
http://www.pctoledo.com.br/forum/viewto ... f=2&t=7463
for studies
http://www.purebasic.fr/english/viewtopic.php?t=31091
- Jeff Barnes
- Posts: 933
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Re: Graph Functions Library
Thanks Aferra. I will take a look at it.
Thanks,
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Graph Functions Library
Jeff,
Have you looked at the TGraph class that comes with FW?
Regards,
James
Have you looked at the TGraph class that comes with FW?
Regards,
James
- Jeff Barnes
- Posts: 933
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Re: Graph Functions Library
Hi James,
I haven't looked at that yet...
I'm doing a complete re-write of an older app. One part of the app took data from a medical device (one data point every second) over a 12 hour period. I used LineTo() and MoveTo() to draw the line graph. Now I am looking at doing the same type of graph but over 72 hours.
When I used the LineTo and MoveTo the code I needed to create was just massive. I had to have different display ranges (1 min, 5 min, 15 min, 60 min and the entire data set). I also had to allow the user to page through the data. It was labor intensive and I was looking for an easier way to do it
I haven't looked at that yet...
I'm doing a complete re-write of an older app. One part of the app took data from a medical device (one data point every second) over a 12 hour period. I used LineTo() and MoveTo() to draw the line graph. Now I am looking at doing the same type of graph but over 72 hours.
When I used the LineTo and MoveTo the code I needed to create was just massive. I had to have different display ranges (1 min, 5 min, 15 min, 60 min and the entire data set). I also had to allow the user to page through the data. It was labor intensive and I was looking for an easier way to do it

Thanks,
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Graph Functions Library
Jeff,
You can most of this very easily with TGraph. You just need to define the parameters of the graph (e.g. Line type, grids, legends) and feed it the data. This will be much simpler than what you were doing. The only coding would be to do a manual paging which I think you can do by just substituting an new data range for each time the user presses a button to go forward or backward.
The only issue you will have is the Y-axis range. TGraph auto scales it but It always starts at zero, so depending on your data range this can become a real issue. However, there is hope. There are some links in this thread
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=22687
pointing to a modified version of TGraph that supposedly allows setting of the y-axis range. I have been meaning to look at it, but haven't done it yet.
Coincidentally, I have been using TGraph for a medical data graphing system (blood pressures). For this app, the Y range has not been a problem.
Regards,
James
You can most of this very easily with TGraph. You just need to define the parameters of the graph (e.g. Line type, grids, legends) and feed it the data. This will be much simpler than what you were doing. The only coding would be to do a manual paging which I think you can do by just substituting an new data range for each time the user presses a button to go forward or backward.
The only issue you will have is the Y-axis range. TGraph auto scales it but It always starts at zero, so depending on your data range this can become a real issue. However, there is hope. There are some links in this thread
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=22687
pointing to a modified version of TGraph that supposedly allows setting of the y-axis range. I have been meaning to look at it, but haven't done it yet.
Coincidentally, I have been using TGraph for a medical data graphing system (blood pressures). For this app, the Y range has not been a problem.
Regards,
James
- Jeff Barnes
- Posts: 933
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Re: Graph Functions Library
Hi James,
My Y axis will be values from 40 to 100. So I hope it won't be an issue...
As for the X axis, this is the one where my data will be around 250,000 data points (I made a typo in my original post saying it was the Y axis with the large data).
The X axis will be time in the format of hh:mm:ss ... can TGraph handle this?
My Y axis will be values from 40 to 100. So I hope it won't be an issue...
As for the X axis, this is the one where my data will be around 250,000 data points (I made a typo in my original post saying it was the Y axis with the large data).
The X axis will be time in the format of hh:mm:ss ... can TGraph handle this?
Thanks,
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Graph Functions Library
Jeff,
>The X axis will be time in the format of hh:mm:ss ... can TGraph handle this?
I think so. My chart is also using time on the x-axis but I have been just letting the chart plot it one point per interval even though my times are not the same interval (they could be 5 times in one day, and zero in the next).
However, yours are one data point per second and thus all the intervals are the same so it should work fine for you. I don't know about labeling the increments in time format though. That could be a physical space issue too since each label is eight characters wide and I don't know if it handles vertical labels. I'm not even using labels on the x-axis on mine.
If you want to email me a sample list of data (say 25 points), I will see if I can put together a quick chart for you.
jbott at compuserve dot com
Regards,
James
>The X axis will be time in the format of hh:mm:ss ... can TGraph handle this?
I think so. My chart is also using time on the x-axis but I have been just letting the chart plot it one point per interval even though my times are not the same interval (they could be 5 times in one day, and zero in the next).
However, yours are one data point per second and thus all the intervals are the same so it should work fine for you. I don't know about labeling the increments in time format though. That could be a physical space issue too since each label is eight characters wide and I don't know if it handles vertical labels. I'm not even using labels on the x-axis on mine.
If you want to email me a sample list of data (say 25 points), I will see if I can put together a quick chart for you.
jbott at compuserve dot com
Regards,
James