Welcome to MSDN Blogs Sign in | Join | Help

Microsoft Excel

The team blog for Microsoft Excel and Excel Services.
Sparklines in Excel

Thanks to Sam Radakovitz, a Program Manager on the Excel team, for putting together this series on Sparklines.

For Excel 2010 we’ve implemented sparklines, “intense, simple, word-sized graphics”, as their inventor Edward Tufte describes them in his book Beautiful Evidence.  Sparklines help bring meaning and context to numbers being reported and, unlike a chart, are meant to be embedded into what they are describing:

blogimage1

In the above example, the sales number alone gives you a single moment in time, but adding sparklines in the table, next to the numbers it’s describing, gives history and shows a pattern of sales.  The sparklines aren’t floating on the grid of Excel like a chart does.  They aren’t rows, column, or sheets away from the data.  They are in the table giving context to the numbers, unobtrusively, and appear like text in the cell.

blogimage2

Sparklines in this table are displaying the win / loss record for a softball league … they can convey the entire season of each team in the league.  From reading the sparklines we can tell ‘QPB Ballers’ lost their first game but never lost again, ‘Amazon Bats’ had a rough start but finished strong, and ‘Brusing Borders’ was inconsistent throughout the season.

For this first version of sparklines in Excel we wanted to do a couple of things:

  • Enable folks to easily create the most common types of sparklines found today
  • Create a stable and efficient code base shared with Excel charting that we can build on in future releases

Over the next week or two I’m going to review sparklines in Excel and cover how to create them, style them, adjust options for the axis and group, and give a few other tips and examples of using them in Excel … as well as introduce you to a book store demo file with a variety of different usages for sparklines in Excel:

blogimage3

Stay tuned!

Posted: Friday, July 17, 2009 9:58 AM by Joseph Chirilov

Comments

Chris Leach said:

Sweet! Now I won't have to create PDF files to share sparklines with people who don't use the same add-in I do.

# July 17, 2009 10:36 PM

sam said:

Nice start... long way to go though.

http://sparklines-excel.blogspot.com/

You need to include Box Plots, Bullet Charts and whole lot of extra options like Bechhmark line for Bar chars

Horizontal Bar Charts...

Download the PDF manual and you will know what i mean

# July 18, 2009 1:52 AM

Colin Banfield said:

The Sparkline feature is very well architected. Love the group options. The ability to set the vertical axis min and max values the same for all sparklines in a group (*automatically*) is a feature that would be very useful for standard charts in a group.

Sam is on the money though. I'm disappointed by the absence of box plots and bullet chart sparklines - both potentially far more useful than win-loss in a business context.

For line sparklines, an average line and a shaded region indicating "normal" behavior (+/-3-sigma from average), are *extremely* important elements for providing context to the values in the sparkline.

Win-loss - Is there a reason why draws aren't considered (win-loss-draw)? Draws are often indicated by the absence of a bar.

Finally, it would have been nice to have a hyperlink option so that when you click a sparkline, you can view the data behind the sparkline, or perhaps a more detailed chart. You can approximate this behavior by placing a transparent shape over a sparkline and adding a hyperlink to the shape, but this requires extra work.

# July 18, 2009 9:56 AM

Biff said:

@sam: You are so right! They also need to add kitchen sink type sparklines.

# July 18, 2009 10:58 AM

Jon Peltier said:

This looks like a good start, much better than the simpler data bars that came with 2007. Sam and Colin are right that the implementation is as yet incomplete, but guys, they're on the right track.

# July 18, 2009 11:01 AM

Jon Peltier said:

This looks like a good start, much better than the simpler data bars that came with 2007. Sam and Colin are right that the implementation is as yet incomplete, but guys, they're on the right track.

# July 18, 2009 11:01 AM

ashok hingorani said:

very neat

5 ago i wrote the Tool that integrated Excel with Groove to provide true, real time, co-edit of excel workbooks - was tough enough given the features in excel then - now they just upped the bar :-)

cheers

# July 18, 2009 12:14 PM

Colin Banfield said:

Jon, yep. My comments on sparklines(and all my subsequent comments regarding feature enhancements) are intended as food for thought for Excel 15, since at this point, Office 14 is a done deal feature-wise.

Speaking of the data bar feature, I'm quite impressed by how well it's implemented in the new release. Most of the solicited feedback has been taken into account.

# July 18, 2009 1:00 PM

Jon Peltier said:

Colin -

I just installed the technical preview, which went very smoothly. The new interface is cleaner than 2007's: less chart junk in the ribbon, and it may have been shrunk a bit.

I did notice one labor saving feature that was added, or rather reinstated. You can now double click on a chart element, and cause the format dialog for that element to open. So as you say, they've heard the 57 billion complaints and have tried to make amends.

Of course, even if they eliminated the 57 billion complaints, users would turn around and complain 57 billion other ways.

# July 18, 2009 9:40 PM

Colin Banfield said:

Jon, less chart junk in the ribbon? Apart from the new Draft Mode option on the right of the Design tab, the chart commands are identical to those in Excel 2007!

I made a number of observations regarding charts but hadn't noticed the "new" double-click feature - thanks. However, there're still four tabs just to format markers and pretty much all of your Excel 2007 chart complaints are intact.

# July 19, 2009 12:14 AM

sam said:

Solid fill for "Data Bars" and Zero Length Bar for Zero Values make Data bars usable and becomes a Sparkline

# July 19, 2009 2:44 AM

Gus said:

Weel i agree with Colin , about the chart ribbon "Apart from the new Draft Mode option on the right of the Design tab, the chart commands are identical to those in Excel 2007". I would expect something new in the chart arena, like the add-in that Bonavista has "Chart Tamer", very useful ...

Althought the sparkline feature is very well recieved, they still need more work. Bullet Charts is a must !!

# July 19, 2009 7:42 AM

Jon Peltier said:

Colin -

What I meant is that the ribbon is cleaner, with less ugly gray gradient and fewer borders. I didn't think they made many changes to the actual content and layout of the tabs. I haven't really had time to make a judgment about its usability. The whole feel of the Office button is different, partly good, but I exited Excel accidentally when I thought I was exiting the dialog thing.

The double-click thing was a pleasant observation, I didn't make any other pleasant observations, like reduced tabs and clicking and more visible options. I guess I'll be able to market a UI supplement to 2007 and 2010. Woo-hoo!

# July 19, 2009 11:22 AM

sam said:

Jon,

I wonder why double click on a shape/picture does not bring up the format dialog....like in Oh you know there used to be a user friendly product called 2003....

# July 19, 2009 9:23 PM

Biff aka T. Valko said:

"Biff said:

@sam: You are so right! They also need to add kitchen sink type sparklines."

Biff, whoever you are, quit using my name.

Biff

T. Valko

# July 19, 2009 11:39 PM

Rhett Smith said:

I'm very happy to see the inclusion of sparklines in Excel 2010.  Question: if you have a pivot table showing aggregate data, is there any way to automatically display a sparkline in each cell of the pivot table to give the gist of the summary cells?  As far as I can tell, right now, I'd have to go to each cell, drill-down, choose insert sparkline, pick the drilled-down data and then place the sparkline in the cell in the pivot table.  It would be great when creating a pivot table if I could see both the aggregate values and a sparkline giving me the context behind themm.  Any advice greatly appreciated.

Thanks,

Rhett

# July 20, 2009 12:14 AM

Biff said:

@T. Valko: http://en.wikipedia.org/wiki/Biff_(disambiguation)

# July 20, 2009 2:51 AM

Fabrice Rimlinger said:

Great to see all this buzz about coming Sparklines.

I agree w/ Jon, it's a good start, but when it comes to minimalist tools, every little detail counts or you you might end up with something just ... useless.

Variance chart (--> Horizontal bar properly implemented...) Bullet chart and especially Scales are a must for any decent dashboard and should be included from the beginning.

For those dealing with large series, a Boxplot in a cell is extremely powerful. Maybe for a next step though.

Jon, is there a way for me to test XL 2010, and give my feedback on the new Sparklines.

I experimented a lot and got a lot of feedback with my buggy version, and I think it would be worth sharing it with the Excel Team.

# July 20, 2009 5:12 AM

Jon Peltier said:

Sam -

The charts got the double click because we yelled and screamed and whined and cried about losing this feature in charts, and they caved. Actually, I think it was more like, yeah, that was a dumb decision. I don't think anyone griped so much about shapes, and anyway, shapes are pert of Office, while charts are part of Excel, and Office are the <a href="http://businesstoolsblog.com/2009/07/where-is-the-paragraph-set-up-box-in-microsoft-word-2007/">evil easter bunnies</a> who brought us The Ribbon.

Rhett -

Hey that's a good idea, and no, I don't think this would be possible. Sparklines need a formula, and you can't add your own content to a pivot table. But it would be a great feature to add to pivot tables.

# July 20, 2009 6:59 AM

Sam Rad said:

I’ll pick at some of the comments above:

1-Nice start... long way to go though.

Sam: There are definitely more enhancements we want to do, you and some other folks call out a lot of them in the comments here.

2: Win-loss - Is there a reason why draws aren't considered (win-loss-draw)? Draws are often indicated by the absence of a bar.

Sam: Yes, the Win/Loss works like a 100% stacked column, so there are draws.

3: Solid fill for "Data Bars" and Zero Length Bar for Zero Values make Data bars usable and becomes a Sparkline

Sam: Not sure I follow how it’s a sparkline?  A vertical one across many cells?

4: If you have a pivot table showing aggregate data, is there any way to automatically display a sparkline in each cell of the pivot table to give the gist of the summary cells?

Sam:  Not automatically :-/  this is something we really want to add.

# July 20, 2009 1:47 PM

Colin Banfield said:

"It would be great when creating a pivot table if I could see both the aggregate values and a sparkline giving me the context behind themm.  Any advice greatly appreciated."

"Sam:  Not automatically :-/  this is something we really want to add." ...one of these days.

If you really need this feature in your lifetime, then you can try XLCubed.

# July 21, 2009 5:11 PM

MIchelle Becker said:

I just saw a live demo of Sparklines in a room with 12K ppl...and it got major applause. pretty cool stuff. go team excel!

# July 26, 2009 1:15 AM

Stephen Few said:

Just a quick comment regarding terminology. The term "sparkline" is being used too liberally in this discussion. Tufte didn't invent small graphs, he invented a particular type of small, high-resolution graph that displays time-series values without axis lines or scales, called a "sparkline." As he states in "Beautiful Evidence": "Small graphical images have collaborated with text and tables for centuries." A bullet graph is not a sparkline, nor are data bars. Placing a graphic in an spreadsheet cell does not make it a sparkline. You won't find any mention of spreadsheet cells in Tufte's description of sparkline (nor any interest in spreadsheet software whatsoever). To avoid confusion, which is easily created and easily spread, I recommend we use our terms more precisely.

Thanks,

Steve

# July 28, 2009 5:18 PM

Colin Banfield said:

Stephen, good point. What's confusing is that the term sparkline is being used for stuff that aren't lines at all (e.g. Column Sparkline). The free tool "Sparklines for Excel" and Bissantz SparkMaker are guilty of the same thing . BonaVista uses the term "MicroCharts," where the Sparkline is one of the microcharts. ConnectCode refers to their SparkCode Professional software as Sparkline software but they don't describe all the charts they produce as Sparklines. ConnectCode also has a free version called TinyGraphs, where the Sparkline is described as one of the graphs.

The moral of the terminology issue you've raised suggests that the Ribbon group should be renamed to something generic like "In-Cell Charts," where the Line option just happens to approximate a Sparkline.

# July 28, 2009 6:02 PM

Jon Peltier said:

I think the term "in-cell charts" is a bit awkward, and it might be confused with the retro all-text spreadsheet charts built up with characters using REPT().

What's wrong with "Sparkcharts"? Sparklines and sparkbars are subsets of sparkcharts, and in fact the W-L charts are subsets of sparkbars.

# July 29, 2009 8:42 AM

Colin Banfield said:

It's doubtful that "in-cell charts" could be confused with the REPT() stuff. First of all, REPT() for charting purposes is not a function that's obvious to a majority of users, and secondly, there's never been any official terminology or feature named "in-cell charts" in Excel - so at the end of the day, who's being confused?

For the 99% of users that have never even been exposed to to the term "sparkline," what meaning does "sparkchart" convey? For these folks, "In-cell charts" is descriptive, and straight to the point. However, given that the feature is being hyped so much, the marketing folks at Microsoft would probably prefer a fancier name.

# July 29, 2009 9:55 AM

Chris Damsgard said:

I came here to add the comment that the In-Cell line charts (what you call sparklines) needed to have an option for a "normal" or target range (e.g. +/- 3 sigma).  I see now that others realize the same thing.

I also want to declare strong agreement with Colin's first comments on bullet charts and box plots at the very top.

Part of my job is creating effective dashboards for a Fortune 500 company, and Excel Services has been my tool of choice for over a year now.  But there is still much to be desired in the way of charting and visualization.

# July 30, 2009 10:13 AM

Jay Lakumb said:

Will sparklines be supported in Excel Services 2010?

# July 31, 2009 9:30 PM

Joseph Chirilov said:

Jay: Yes, Excel Services 2010 will be able to render sparklines created in Excel 2010.

# August 3, 2009 8:34 PM
New Comments to this post are disabled
Page view tracker