Showing posts with label VBA. Show all posts
Showing posts with label VBA. Show all posts

Cross-tab charts with SFE

In-cell charts are not meant to be accurate, but to provide a quick overview and by densifying information, to allow the eye to englobe multiple charts. Then, the brain will correlate those small parallel multiples.
Nevertheless, it is key to provide some context or reference, even for small charts.

In SFE, I have always taken care to include reference in the different types of charts :
  • Horizontal lines in BarChart and LineChart.
  • Normality band in LineChart.
  • Horizontal and Vertical lines in (unpublished yet) ScatterChart.
Those references are here to answer the following questions when analysing data  : What is my target ? What is my limit ? Where is the budget level ?... etc

An additionnal reference can provide great help when it comes to read and analyse periodical data : background shading. To identify weekends in a week or every other month in a year for example.

The intensity of the shade must be carefully choosen, in order to be identified by the eye, but remaining neutral, without disturbing the reading of the the lines or columns.

Anyway, SFE now includes the possibility to create periodical vertical grey areas.

For this purpose, I added 3 additional parameters to Barchart and LineChart :
  • ShadedStart : At which position the first grey band should start
  • ShadedWidth : How many positions on the x axis should be shaded
  • TransparentWhidth : How many positions should follow without shading.
Example : show a grey background for saturdays and sundays, starting sunday.

Shaded sparklines
  • ShadedStart = -1. With ShadedStart = 0, the chart would have started with a grey zone covering Saturday + Sunday. -1 will have the chart to start with 1 position (sunday) on a grey background.
  • ShadedWidth : 2. For Saturday + Sunday
  • TransparentWhidth : 5. For the 5 working days of the week


As shown in the example above, the grey zone covers 100% of the cell's height, in order to display a continuous band when LineChart and BarChart are vertically aligned.

Robert Mundigl and Matt Grams provide an excellent example (again!) of Cross-tab chart with standard excel charts here.

PS : You might have noted that LineChart, BarChart and ScaleLine also provide a vertical reference line... that will be described in the next post.


Release 3.2.5 for Excel 2000.

I have had a great deal of help from Holland during the last weeks.

Nixnut is using XL-2000. He is very knowledgeable about statistics, and rewrote some (big) parts of the code.

Here is Nixnut last
XL-2000 version of Sparklines for Excel.

This release bring some new charts :
StripeChart : It shows a vertical marker line for each value in the range and optionally a taller red line for the average mean. The result is a graph with the distribution of the values in the range.


SpreadChart : A lot like the StripeChart except it shows the frequency distribution of the values in the range in one of three styles: stacked (default), spread or jittered.
It uses dots for the data points.

XBoxPlot (Extended Boxplots). A bit experimental. These boxplots take a range as input and calculate values for whiskers, hatch marks, boxes and outliers as necessary.
There are different classes of boxplots:
Tukey (default), 5NS (five number summary), 7NS (seven number summary), and Bowley.
There are also two styles: Classic (default) and Neo.
The Neo style shows bars instead of whiskers.



Visible enhancements of existing functions :
  • Forecast marker for Bulletchart and RevBulletChart
Invisible enhancements :
  • Improved "Redraw" and "Delete" routines.
  • Version number not included in file name, for easier upgrade.

A great deal of very useful Sparklines, dense, self explanatory and easy to embed in dashboards.

This new version is not documented yet...


Well, it seems that I will have to catch up with the XL2003 version... any volunteer for XL2007 ?


New set of Sparklines UDF

Sparklines v3.2.2 is available on Sourceforge.

This new version can be used as a stand alone workbook(*.xls) or as a permanent Excel add-in (*.xla).

Creation of sparklines is made available through a menu and a toolbar, or by typing the function directly in a cell.




Get a copy of the file here . last Version 3.2 for Excel 2003 - October 24th 2008

Several versions are available for download :

To insert a Sparkline, use the Sparkline Menu or Toolbar.
Fill the function argumentsin the Function Wizard.



Some Sparklines do not display properly when first created with the Function Wizard.
Just update them with the "Redraw Sparklines" option of the menu or toolbar.


Please give me some feedback, share
your ideas and I will do my best to improve the functions.




Pareto() specifications





















Pareto() sparklines are really meaningful when stacked like here.