ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   lines on bar charts (https://www.excelbanter.com/charts-charting-excel/24951-lines-bar-charts.html)

DavidNHFCU

lines on bar charts
 
If I graph a simple straight trend line on a chart, how do I get it to run
behind the bars on my chart - rather than showing across the bars?

John Mansfield

David,

To do so, you will need to create an overlay chart. An overlay chart is
simply one chart laid over another. First create the Excel generated line
and bar chart. The, make a copy of the chart. Delete or make tranparent
everything in the second chart with the exception of the columns. Finally,
overlay the second chart over the first.

What I'm describing above sounds like a lot of work. However, Jon Peltier
has an example with VBA code that automates much of the process. Jon Peltier
describes this technique here. You can download the example with code from
this link as well.

http://peltiertech.com/Excel/Charts/AlignCharts.html

----------------------------
Regards,
John Mansfield
http://www.pdbook.com


"DavidNHFCU" wrote:

If I graph a simple straight trend line on a chart, how do I get it to run
behind the bars on my chart - rather than showing across the bars?


bj

another way to do this is to use the data from the trend line and plot out a
curve representing the trendline. put it on a different axis so that it can
plot behind th ecolumns.

"DavidNHFCU" wrote:

If I graph a simple straight trend line on a chart, how do I get it to run
behind the bars on my chart - rather than showing across the bars?


Jon Peltier

bj -

Did you try this? The trendline, for a series on any axis, is drawn in front of a
bar or column series, on any axis. So are connecting lines for any marker-and-line
style series (scatter and line charts), and error bars.

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

bj wrote:

another way to do this is to use the data from the trend line and plot out a
curve representing the trendline. put it on a different axis so that it can
plot behind th ecolumns.

"DavidNHFCU" wrote:


If I graph a simple straight trend line on a chart, how do I get it to run
behind the bars on my chart - rather than showing across the bars?



bj

You are right, My suggestion does not work with Excel.. I remember doing it
so now I wonder what program I was using at the time.

"Jon Peltier" wrote:

bj -

Did you try this? The trendline, for a series on any axis, is drawn in front of a
bar or column series, on any axis. So are connecting lines for any marker-and-line
style series (scatter and line charts), and error bars.

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

bj wrote:

another way to do this is to use the data from the trend line and plot out a
curve representing the trendline. put it on a different axis so that it can
plot behind th ecolumns.

"DavidNHFCU" wrote:


If I graph a simple straight trend line on a chart, how do I get it to run
behind the bars on my chart - rather than showing across the bars?





All times are GMT +1. The time now is 11:08 AM.

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