I have a statistics table that is described as (partner_id varchar, day date, hour int, stat_name varchar, stat_value int) (uniqueness on (partner_id, day, hour, stat_name combo.)
I would like to create a graph of one or two statistics. That is, given a partner_id, the code will generate a png where the x-axis represents time, and the y-axis represents the statistic I want to show. The code will also be able to generate 24-hours-history, 7-days history, 30-days history and 1-year-history.
Seeking something that looks like: [url removed, login to view]
You can use rrdtool to generate the graph, that's fine with me. But you will have to create the .rrd file and delete it after generating the graph.
Code must be written in php, and should be able to output Content-Type: image/png directly.