Attached is a patch to bring sparkline from 4.7 to 5.1 (the settings hook needed to be changed).
I can't attach the info file, but this is what I did:
name = "Sparkline"
description = Allows users to create sparklines using the PHP sparkline library.
version = 5.x-1.x-dev
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | sparkline_1.patch | 12.03 KB | eaton |
| #2 | sparklines.png | 7.76 KB | eaton |
| #1 | sparkline_0.patch | 10.71 KB | eaton |
| sparkline.patch | 1010 bytes | lambert-1 |
Comments
Comment #1
eaton commentedI took a stab at it and fixed some outstanding bugs that had plagued the module since the proof-of-concept I wrote, as well as adding some new features. It now supports line, bar, and winloss graphs, and supports additional params like [sparkline height=25 max=50 ...] for greater flexibility. It also uses (behind the scenes) FAPI compatible elements for rendering, opening up future applications as a CCK widget or node element.
Comment #2
eaton commentedAs an example of what can be done with the new features, a 20-line php snippet on my site queries the DB for some useful stats, and creates a FAPI-like data structure with a couple of sparkline_bar elements in it. Then drupal_renders it. I took a screenshot of the results in the sidebar and it looks nice.
Comment #3
eaton commentedThe previous patch stuck things in the wrong directory, and also didn't properly recognize when files were cached -- resulting in an ever-growing sparklines directory. Doh! Fixed now.
Comment #4
eaton commentedCommitted with Chris's thumbs up, and released as version 5.x-1.x-dev. An official 'full' release will pro'lly be rolled by Chris when he has a chance.
Comment #5
Chris Johnson commentedWorking on it.
Comment #6
(not verified) commented