Excel chart draws line outside Y axis
Hello again,
I have partially solved my problem, in that I can now see how the line
comes to be drawn outside of the Y axis. I still maintain that this is
a bug, so I will report here my findings in case they help somebody
else at some time in the future.
First of all, I discovered that the line also appeared on the small
graphic on the "Series" tab of the "Source Data" dialog box, but this
still didn't help to solve the problem.
My chart included error bars (set at -100%), and this gave me the first
clue when I noticed that the unwanted line was the same height as one
of the error bars. So I then formatted the error bars in different
colours, and the line to the left of the value axis changed each time
to the same colour. Clearly, this was the source of the problem.
However, I noted that whilst the error bar was appearing here, the line
itself did not plot beyond the axis, and neither did the line marker.
What I didn't mention earlier, was that my spreadsheet includes some
dynamic ranges, and I use these to control the period of time that is
plotted on the chart. As the dynamic range changed, the points with
error bars would move to the limits of the time-frame in question. In
my case, I was reducing the time-frame by bringing forward the end date
one month at a time and, in doing this, one point with an error bar
would move up against the right axis. Then, having reached the end,
instead of disappearing, it reappeared on the other side of the chart,
just outside of the left margin! On experimenting, I found that by
changing the start date, error bars could also be moved to the left,
and then off the plot area in a similar fashion.
As a work-around to this bug, I amended my macro to change the value of
the plot to 'zero' as points moved beyond either the left or right
axes. In effect, I guess that although the points still exist, they
are plotting at 'zero' height and, therefore, they are no longer
apparent on the screen.
I trust that this helps somebody else in the future.
Regards,
Philip Clarke
|