ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Problem adding a vertical line to a graph with months on x-axis (https://www.excelbanter.com/charts-charting-excel/141801-problem-adding-vertical-line-graph-months-x-axis.html)

[email protected]

Problem adding a vertical line to a graph with months on x-axis
 
I'm trying to add a vertical line that would indicate the current
month, i.e. May 2007, to a graph with a Line and a Stacked Area, and
months (e.g. January 2004 through December 2007) instead of days on
the x-axis. I've tried different variations of
http://peltiertech.com/Excel/Charts/...ertSeries.html, without
success. Any suggestions?


Jon Peltier

Problem adding a vertical line to a graph with months on x-axis
 
What isn't working?

Is your X axis a time-scale axis? You need to use the corresponding date as
the X values of the XY series that controls the vertical line. In the
time-scale axis, is your Base Unit days? Then you can use the date you want
as the XY series' X value. Is the Base Unit months? Then you need to use the
number of months since January 1900. If it were my chart, I'd use days as my
Base Unit, and the date for the XY series, because it's easier.

Is your X axis a category axis, using the months as labels, not as numerical
dates? Then count categories from the X axis minimum, and use that as your X
value for the XY series.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


wrote in message
ups.com...
I'm trying to add a vertical line that would indicate the current
month, i.e. May 2007, to a graph with a Line and a Stacked Area, and
months (e.g. January 2004 through December 2007) instead of days on
the x-axis. I've tried different variations of
http://peltiertech.com/Excel/Charts/...ertSeries.html, without
success. Any suggestions?




[email protected]

Problem adding a vertical line to a graph with months on x-axis
 
It worked! Thank you for your help, Jon.

I'd prefer months on the X-axis because the data is recorded on a
monthly basis. I use the first day of each month to represent that
month because Excel doesn't (to my knowledge) have a data type for
months.

Is there some neat trick for displaying percentages on the secondary Y-
axis, in addition to the absolute values on the primary axis? The
difficulty is that the secondary Y-axis is already in use for the
vertical line.



All times are GMT +1. The time now is 01:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com