Friday, March 13, 2009

Flot gets it's own page.

This morning, I deployed a bug-fixed Quicksilver and made sure some of the older apps were still running.

The next big improvement is going to be flot charts... and I have been thinking of the best way to incorporate them. The old Google Charts were literally single strings of broken-out data that were sent to Google and returned the static image of a chart.

Flot is much more involved and has more javascript. It literally quadruples the amount of code that the old charts had, and it would probably not be a good candidate for simply plugging into the usual system (which would simply make the main pane of Quicksilver expand rapidly).

Thus, next week, I am going to try and encapsulate the flot data into it's own jsp page and just have the google map call the page and pass in the polygon id. The JSP would then call the code to calculate everything, fill the arrays for the flot chart, and then plot them out in a main chart and an overview.

The first step will be just making sure that a HTML popup calling an external page will display properly. Then it is automating the load setups and adjusting the queries to actually pull 30 days of leading data and running the C2 algorithm to get the data for the arrays... the arrays leading to the chart lines.

Cheers, looks like next week will be fun.

1 comment:

Wayne L. said...


Have you had any luck "saving" a flot-based graph to disk? Like allowing users to save a png of the graph for use in a presentation.

We considered using Flot (and/or Flotr), but I was unable to find a way to save the images and our users couldn't accept that limitation. Was curious if this ever came up for you guys?