I’ve switched to the Dygraphs package in HouseMon (see the development branch). Here’s what it now looks like:
(click for the full-scale resolution images)
Several reasons to move away from Flotr2, actually – it supports more line-chart modes, it’s totally geared towards time-series data (no need to adjust/format anything), and it has splendid cursor and zooming support out of the box. Oh, and swipe support on tablets!
Zooming in both X and Y directions can be done by dragging the mouse inside the graph:
You’re looking at step-style line drawing, by the way. There are some quirks in this dataset which I need to figure out, but this is a much better representation for energy consumption than connecting dots by straight lines (or what would be even worse: bezier curves!).
Temperatures and other “non-rate” entities are better represented by interpolation:
BTW, it’s surprisingly tricky to graphically present measurement data – more tomorrow…
Nice graphs!
Are you using the csv file option to display these graphs? I guess you have to prepare those files then? I mean, csv files with x-years of data will be a problem, or not?
The code is on GitHub (in the “develop” branch).
The data is provided as JavaScript arrays. Currently only does what’s in Redis, i.e. last 48 hours of readings. For data further into the past, I’ll use the archiver code, which saves data aggregated per hour (including min/max/stdev), so even a year of data will be manageable.
Ok. I’m not familiar with Coffee but I was able to read approx. What you are doing in there ;-)
You also store the average value, so a total of 5 values!
These are all singel-value sensors I guess. Can you also handle mult-value sensor readings in any way? Example: a sensor reporting every 15 mintes with current, min, max and total/accumulated values over that period of time?
Haven’t implemented multi-series graphs yet, but yes, that’s obviously on the list. As for 15 min vs hourly – it’s currently fixed in the archiver, but here too the plan is to make the buckets configurable to 5/6/10/12/15/20/30/60 minutes (I’m thinking of switching to 15 min here as well).
The aggregation layer would then be extended to supply values in any granularity (including adjusted count/min/max/avg/stddev values) that are a multiple of the stored buckets. Plotting a min/max or stddev band around the actual series is supported by Dygraphs.
Again a good find jcw. I evaluated Dygraph a year ago for representing my smart meter output, and then decided on jqplot, for its more fancy graph formatting and bar-chart abilities.
What happend over time is that jqplot appears to be standing still and the Dygraph got added many nice features in the meantime, such as the bar graphs and touchscreen support. And especially the lack of the last on my smartphone is starting to annoy me with jqplot. So I consider to move over tp Dygraph. It is incredably fast with 8000 data points (sampe every 10 seconds for a day).