Integration of Sparklines to Drupal + feature, module proposal
i am trying to incorparate Sparklines to Drupal -another fan of E. Tufte out there? :)
there is a PHP library for sparklines
http://www.sparkline.org/
'What Are Sparklines?
Sparklines are "intense, simple, wordlike graphics" so named by Edward Tufte. In lieu of a more detailed introduction, Professor Tufte's site has an early release of a chapter on sparklines.'
I vision there can be possible usage of this elagant feature for Drupal
possible internal usage
- Drupal's core and contrib module development process
- stocks.module
- stats
- showing image and media status integrated to each module (image.module, media.module)
- user activity stats
- and possible others
-external data stream usage
i guess any statistical info with xml can be integrated to Drupal site
try the sample on http://www.sparkline.org/ US deficit
which uses the xml output on;
- http://www.whitehouse.gov/omb/budget/fy2004/hist.html
or another usage integration here
http://www.wikispaces.org/ (showing Active Spaces on the block)
I am not a coder but i attempted to integrate and test the idea as below;
1- I have Downloaded the Sparklines PHP lib
http://sourceforge.net/project/showfiles.php?group_id=122936
2- Shortened the directory name to 'sparklines' to simply
3- upladed the Whole directory to Drupal directory
drupal/files/sparklines
so what I got there
drupal/files/sparklines
- lib
- samples
4 - I tested the samples from the browser
www.site.com/drupal/files/sparklines/samples/deficit.php
(sample that shows the US deficit -it takes the data from)
http://www.whitehouse.gov/omb/budget/fy2004/hist.html
and, it worked!! :) - but thats not an integration
so;
5- Home » create content >create page
6- i took the PHP code from
sparklines/samples/deficit.php
7- copy/paste into the page
8- changed the link to the sparklines PHP library
from;
default
require_once('../lib/Sparkline_Bar.php');
to'
require_once('sparkline/lib/Sparkline_Bar.php ');
9- changed the input format to PHP & submit
I got; blsnk page and,
Fatal error: Cannot instantiate non-existent class: sparkline_bar in /home/simplex/public_html/dp/includes/common.inc(1857) : eval()'d code on line 46
So, I can rwalise say I am missing wrapping the theme/site around the PHp code (or isit another way around?)
well, I am not a PHP coder.
now on
1- I need some help about how to integrate Sparklines and what I am doing wrong on above steps or whole idea is wrong and there is another way?
2- Some documentation about how to integrate a PHP code with a library taken from somewhere else that could be a tutorial of -how to case into Drupal Handbooks would be useful to all users
3- Finally its a open proposal to crate a sparklines.module to integrate properly into Drupal as I try to outlined possible usages for Drupal above
-regards

CVS, Sparkline Generator and further links
This is the CVS of sparklines for reference, i tried to 'integrate' worked on its on but not with the my attempt to 'integrate' with PHP page as outlined above
http://cvs.sourceforge.net/viewcvs.py/sparkline/sparkline-php/
Some further links on Sparkline
http://bitworking.org/projects/sparklines/
It requires Python Imaging Library
http://www.pythonware.com/products/pil/
(Sparkline works with GD image lib fine too)
Edward Tufte article
http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_...
i found that Sencer has an article
http://www.sencer.de/article/1135/how-to-inline-your-sparklinesimages-in...
a wiki plugin
http://wiki.splitbrain.org/plugin:sparkline#plugin
~ Basically Sparkline gives possibility to plot any graphs information in tiny, tiny sizes unlike other plotters
This is example is compareson between conventional and graph plotting and tiny Sparkline
http://intepid.com/2004-12-06/23.32/
...and potentially there is plenty of usage as various internal Drupal site info or drawing Extrenal info into your Drupal site in xml, Excel, Word, PowerPoint etc. formats
Ok, since so far there is no negative or positive reaction from you nice people maybe this example site can change your mind ;)
http://www.bissantz.de/sparklines/
and a research paper
http://www.unt.edu/benchmarks/archives/2005/august05/rss.htm
Wikipedia entry
http://en.wikipedia.org/wiki/Sparkline
A WordPress simple-sparklines
sparklines plugin
http://pietersz.co.uk/2005/06/wordpress-plugin-simple-sparklines
and Further reading on Edward Tufte the originator of the idea (not the code)
http://www.edwardtufte.com/tufte/books_vdqi