Line chart with vertical bars

  • Thread starter Thread starter Arne Hegefors
  • Start date Start date
A

Arne Hegefors

Hi! I have a normal line chart (eg a chart with atwo lines. one showing the
price of pepsi and the other showing the price of Coca cola). On the x-axis I
show the dates. Now on certain dates I want to insert bars into the graph to
highlight to the view that something has happened. The bars shall go from
the top to the bottom of the chart.

I have tried doing that by creating a "time series" for the bars ie showing
a very high value on the dates that I want to highlight and zero otherwise.
this did not work. I also tried adding Highest-Lowest bars to the bars but
they spilled over into the lines. Is there anyone how knows of a good way of
doing this or maybe a site that explains how to do it I would be most
grateful for your help. Thanks!
 
Hi,

Here is one way:

1. Set the Maximum of the Y-scale to a fixed amount (otherwise Excel will
adjust the chart with this approach) - suppose you set it to 100
2. Suppose your current plot range is A1:B12, with nothing in C1:D12, plot
the entire four columns A1:D12
3. In C1:C12 enter 0 at one or more points where you want a line
4. In D1:D12 enter 100 at the same points as in step 3
5. Select one of the new series on the chart and choose Format, Selected
Data Series, Options, and check High-low lines

Make any adjustment to the markers and lines on the Format tab, I set them
both to None. Repeat this step for the other new series if desired. My plot
area looked like this:

Jan 51
Feb 88
Mar 62
Apr 57
May 9 100 0
Jun 59
Jul 13 100 0
Aug 45
Sep 15
Oct 74
Nov 32
Dec 74

If this helps, please click the Yes button

Cheers,
Shane Devenshire
 
I found this technique difficult when a graph contains more than one other
series- the bars connected all the series, rather than just the desired
event. It helped to add these bars on a secondary axis instead. Thanks for
your help.
 
Back
Top