ScaleLine and ScaleXY upgrade

Scale Lines UDF now comes in 2 flavors :

  • ScaleLine() : used next to LineChart() and Barchart(), with the ticks aligned under each "Position".
  • ScaleXY() : Used under or above ScatterChart(), with the tick aligned with given "Values".

The distinction between Position and Value is key here.

Basically, I would say that :
  • Scaleline() starts with 1 , that is with the first item, date, or in general Position. Ticks are aligned with the dots of LineChart() and the center of the columns of BarChart().
  • ScaleXY() starts with 0, as any xy chart, where X and Y axis cross at 0. Ticks are aligned with the points of ScatterChart().
Both UDF also include 2 additional parameters :
  • MarkPosition and MarkLegend for ScaleLine()
  • MarkValue and MarkLegend for ScaleXY()

This allows you to draw a vertical line under a given position or value and to add some text next to it.
The space available for the text is half the width of the cell.
The text will automatically be displayed left of the line if the line is in the right half of the cell... look at the image above, you'll get it faster.

A beta version of the add-in for XL2007 is available HERE if you want to give it a try and give me some feedback.
A sample file illustrating this post is available here.
Note that Pareto() and Cascade() now have different behavior (Still have to update the manual...).
Be sure to backup the previous version of SFE before testing.


Mpopow said...

Is it possible to include a BarChart and a LineChart on a single graph in a single cell like the one ion this example? Also I am trying to chart a stock price together with the S&P500 index, how is that possible given that they are different scales? Thanks

Mpopow said...


I have 4 questions: 1) is possible to superimpose a BarChart and a LineChart on the same chart cell? 2) In your example where you have a BarChart and directly below that a LineChart, are both those charts able to be put in one chart residing in the same cell? 3) I wish to superimpose two stocks that have very different scales, like the S&P 500 and LSI for example. How is that possible? 4) it is unclear to me how to use Mini and Maxi in LineChart(), what do you mean by "variant." I understand these functions to mean that a horizontal line will be drawn touching both the Mac and min pint, is that correct?

Thank you,