Posts

Showing posts with the label sparklines

Sparklines with the Google Chart API

Image
Sparklines are described in Edward Tufte's book Beautiful Evidence (2006) as “small, high resolution graphics embedded in a context of words, numbers, images”. In one of our projects we needed sparklines and one option was to use this open source package by Larry Ogrodnek . Just out of curiousity I was wondering how far we would come if we would use the Google Chart API .  That was until I ran into this article where I saw sparklines created with the Google Charts API and without the x- and y-axis. How the hell did he do it? Well ... it seems to be an undocumented feature also used by Google on their financial site. Instead of using cht=lc (chartype is line chart) you can use cht=lfi (charttype is financial line chart). Grab the code: http://chart.apis.google.com/chart?chs=80x20&cht=lfi&chco=0077CC&&chm=B,E6F2FA,0,0,0&chls=1,0,0&chd=t:27,25,25,25,25,27,100,31,25,36,25,25,39,25,31,25,25,25,26,26,25,25,28,25,25,100,28,27,31,25,27,27,29,25,27,26,26,25,2...