[ABE.pm] Generating report graphs

Faber J. Fedor faber at linuxnj.com
Thu Nov 9 17:34:17 PST 2006


This is a programming/framework question.  The OS is RHEL 3, database is
MySQL 3.23, the preferred viewer is Firefox and the languages involved
should be scripting languages, i.e. no C++ or Java.

The task at hand is to generate a report of various charts.  The
characteristics of the reports are:

1. The charts are statistically-based time series, i.e. standard
deviations, modes, summations of series, multiplication of series, etc
over days or months. Although the data is financial, the reports are not
what we typically think of as business-based, e.g. not "net profit of
the past three quarters".

2. The reports must have the ability to drill-down one level; more
levels would be fine, but one level is acceptable.  A "drill-down" is
defined either as a new graph of data (replace the current one?  Pop-up
another window?) or even simply a pop-up window showing a table of data
whenever the mouse clicks on or hovers over a data point.

3. There will be multiple graphs per report.

4. The report must be self-contained, i.e. once the report is generated, no
calls back to the database or any outside source is possible.  

How would you accomplish this?


My approach was to do the charts as SVG objects and contain all of the
charts and pop-up/drill-down data inside an HTML page; that way it would
be self-contained. I did something similar with HTML tables instead of
SVG objects and it worked great.

I attempted to use Perl and SVG::TT::Graph::TimeSeries to generate the
individual charts and plan to use RoR to put a web interface on all
of it.  Unfortunately, SVG::TT::Graph::TimeSeries doesn't play well with
multiple graphs on a page, doesn't do the drill downs and some of the
graphs are buggy, e.g.  the bar graphs assumes the bars' zero is always
the x axis. 

I have yet to find another Perl library that can let me do SVGs the way
I need to and I'd like to avoid hacking SVG::TT::Graph::TimeSeries if at
all possible.


-- 
 
Regards,
 
Faber Fedor
President
Linux New Jersey, Inc.
908-320-0357
800-706-0701

http://www.linuxnj.com





More information about the ABE-pm mailing list