Reply to All
Show messages
Messages
Inbox
Search
Login
1–10
11–20
…
41–47
PHP MySQL Charts/Graphs
From: ANT_THOMAS
5 May 2013 19:47
To: af (CAER)
9 of 47
40466.9
In reply to
40466.8
Yeah, I'm currently working my way through monitor.js, hopefully won't take me too long to get something looking reasonable
:$
From: af (CAER)
5 May 2013 20:44
To: ANT_THOMAS
10 of 47
40466.10
In reply to
40466.9
The best thing about Flot, I reckon, is that it gives you a nice-looking graph pretty much by default.
I think the trickiest thing I did on my monitoring thing was the day/weekend shading, and maybe the smoothing, although that was more a case of me being slow to understand how
Savitzky-Golay works (it's actually pretty simple).
From: ANT_THOMAS
5 May 2013 21:29
To: af (CAER)
11 of 47
40466.11
In reply to
40466.10
Well I seemed to have solved the major issue of being able to tell what the date/time is by using a proper time format in the database rather than doing conversions. All new entries are added with a unix time stamp.
From: af (CAER)
5 May 2013 21:47
To: ANT_THOMAS
12 of 47
40466.12
In reply to
40466.11
Heh yeah using a numeric timestamp makes things much easier, for one thing because that's what the Flot-time thing expects, and for another it makes it easier to do comparisons.
From: ANT_THOMAS
5 May 2013 22:28
To: Matt
af (CAER)
13 of 47
40466.13
Well that's definitely much better
Now to make it look nicer. Thanks for suggesting Flot!
From: af (CAER)
6 May 2013 06:41
To: ANT_THOMAS
14 of 47
40466.14
In reply to
40466.13
One thing I did to make mine look slightly nicer is to trim the start to where the time is a whole number if minutes/hours – that way you get nice round "16:00" time labels, rather than "16:42" and such.
From: ANT_THOMAS
6 May 2013 08:37
To: af (CAER)
15 of 47
40466.15
In reply to
40466.14
Good idea, that would make things look a bit better.
From: ANT_THOMAS
6 May 2013 14:01
To: ALL
16 of 47
40466.16
Looking much better
http://www.antthomas.co.uk/temperature/
Only real issue is that the database is on my home server so it's a bit slow, especially on the larger time periods.
EDITED: 6 May 2013 14:04 by ANT_THOMAS
From: Matt
6 May 2013 17:07
To: ANT_THOMAS
17 of 47
40466.17
In reply to
40466.16
Do you have indexes on the columns you are joining / sorting on in your database tables?
From: ANT_THOMAS
6 May 2013 17:09
To: Matt
18 of 47
40466.18
In reply to
40466.17
Yeah, all have an id which is auto incremented.
I did think of just getting odds or evens to half the data.