2005.08.03 07:14 PM

Sparklines 2.1

[Updated 8/31/05: Now version 2.3.]

[Updated 8/25/05: Now version 2.2.]

In a comment on my Sparklines 2.0 post, Curtis Hannah brought my attention to some updates Edward Tuft made to sparklines in his new work Beautiful Evidence (not yet released). Specifically, Mr. Hannah described the new normal range backgrounds on smooth sparklines and asked for help implementing them in my sparklines ASHX service.

I went ahead and added them and bumped the version to 2.1. I also made a small change in the color used for the smooth sparkline lines (from #888888 to #999999) to eliminate dithering.

The new version is backward-compatible so I simply replaced the source.

Here are some IMG elements pointing at the updated spark.ashx handler showing normal ranges along with their querystrings.

sparkline querystring
type=smooth&d=86,66,82,44,64,66,88,96,26,14,0,0,26,8,6,24,52,36,6,10,30&
height=30&min-color=red&max-color=blue&last-color=green&step=2&
last-m=true&max-m=true&min-m=true&
range-lower=25&range-upper=62
type=smooth&d=0,32,10,10,0,5,45,52,32,32,56,11,29,91,77,39,10,10,12,85,67,35&
height=18&min-color=green&max-color=red&last-color=%23CC0033&step=2&
last-m=true&max-m=false&min-m=false&
range-lower=20&range-upper=50
type=smooth&d=0,32,10,10,0,5,45,52,32,32,56,11,29,91,77,39,10,10,12,85,67,35&
height=18&min-color=green&max-color=red&last-color=%23CC0033&step=2&
last-m=true&max-m=false&min-m=false&
range-lower=30&range-upper=30&range-color=lightgreen

Let me know if you have any questions.


Comments

Hello-
I took Prof. Tufte's course yesterday and was immediately intrigued by the SparkLines concept. I have downloaded the code and will compile and take a look at it now. I can't wait. This will add some very nice functionality to my application.

I will keep you posted.

Many Thanks!

Nick

Nick Howard | 2005.08.11 10:02 AM

You're welcome! Feel free to come back and share your experience.

ewbi.develops | 2005.08.11 10:14 AM


TrackBack

TrackBack URL:  http://www.typepad.com/services/trackback/6a00d8341c7bd453ef00d8346653a453ef

Listed below are links to weblogs that reference Sparklines 2.1: