Library to plot a themperature chart

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tikky
Forum Newbie
Posts: 1
Joined: Fri Dec 19, 2008 4:35 am

Library to plot a themperature chart

Post by tikky »

Hello,

I am having my temperature reading in MySQL database and would like to make a chart based on this data.

The only problem is that I can't make a simple x,y chart because I do not have temperature reading every constants step.

I am having in MySQL something like that:
Sensor ID | Themp | Date
001 | 22,5 | 2008-12-15 10:20:15
001 | 21,1 | 2008-12-15 10:28:19
002 | 16,2 | 2008-12-15 10:31:14
001 | 21,7 | 2008-12-15 10:48:09
002 | 17,1 | 2008-12-15 10:52:01
001 | 21,8 | 2008-12-15 11:12:29

And for example if I would like to make a chart from last 24 hours I have a 100 readings from sensor 001 and let’s say 150 readings from sensor 2. And it is hard to make a one chart with both sensors. At the moment I am having something like this (using Open Flash Chart):
http://maxjar.no-ip.org/chart.php

So I am looking for any PHP-based library with time-based x axis.

Sorry form my English, I am not a native speaker.
I will appreciate any help.

Kind Regards,

Piotr
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Library to plot a themperature chart

Post by Mark Baker »

I use jpgraph, and find that it's pretty good
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Library to plot a themperature chart

Post by pickle »

Yep, jpGraph is pretty commonly used.

Another library which makes much prettier looking graphs is pChart. Though I haven't had the pleasure of actually using it, it does look pretty well done.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply