Busta999 wrote: .... No - somewhat daunted by
I should do - I am really enjoying the MatPlotLib graphs right now - but should use your way as more efficient
I am also using MatPlotLib to generate the graphs from the CSV data that the plugin creates.
When I invoke the Control Page that has the graphs, the related server actions (on the page where I select the graph Control page) are: 1) run the TRV Controller plugin action to create the CSV files and then create the graph (via a MatPlotLib action) with a delay of 3 seconds to allow the CSV files to be created. On the Control Page that displays the graph, tapping or clicking on the graph runs the two same actions to recreate the graph.
I normally display 24 hour graphs but have added buttons beneath the graph for
12 hours,
6 hours and
3 hours. Clicking on any of those buttons will regenerate the CSV file and Graphs using the aforementioned actions. The CSV creation Action allows you to specify the period.
In the case of CSV creation using PostgreSQL, the values in the CSV file are taken directly from the Indigo Log and therefore you only get an entry when something changes. The CSV file is top and tailed so that all graph lines start at the Left of the x-axis and end at Right of the x-axis.