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

CommentFileSizeAuthor
#3 sparkline_1.patch12.03 KBeaton
#2 sparklines.png7.76 KBeaton
#1 sparkline_0.patch10.71 KBeaton
sparkline.patch1010 byteslambert-1

Comments

eaton’s picture

Version: 4.7.x-1.x-dev » master
StatusFileSize
new10.71 KB

I 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.

eaton’s picture

StatusFileSize
new7.76 KB

As 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.

eaton’s picture

StatusFileSize
new12.03 KB

The 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.

eaton’s picture

Status: Needs review » Fixed

Committed 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.

Chris Johnson’s picture

Working on it.

Anonymous’s picture

Status: Fixed » Closed (fixed)