Sparklines?

Sparklines?

reinhardreinhard Posts: 2Questions: 0Answers: 0
edited December 2010 in General
Hi All,

I'm a recent convert to datatables and a big fan -- amazing how easy it is to get something up and running and how good it looks out of the box.

One problem I've run into recently is that I'm trying to get one column to display as graphical "sparklines."

This is a simple but powerful visualization that I think is a natural fit for datatables, basically a mini line graph for quickly communicating trends.

Unfortunately I can't get any of the sparkline implementations I've found to play nice with datatables. They all display fine for the initially visible rows, but don't draw at all for any rows beyond that. I've tried jquery sparklines, google viz api sparklines, and John Resig's bare bones canvas/js version. They all have more or less the same issue.

Has anyone here been able to get around this? Sorry if this is a newbie question -- I'm a newbie.

Reinhard

Replies

  • reinhardreinhard Posts: 2Questions: 0Answers: 0
    edited December 2010
    Nevermind -- as usual I figured it out 5 minutes after posting (though I'm sure if I hadn't posted it would have taken me days).

    The trick (for jquery sparklines at least) is extremely subtle and counterintuitive and only a supra-genius like myself would ever have figured it out:

    Put the sparkline initialization call BEFORE the datatables initialization.

    Thanks all for your attention -- and do check out sparklines if you haven't already. They're very cool in lots of contexts, but particularly tabular ones.

    Reinhard
This discussion has been closed.