0

I am trying to lay a line graph (on a secondary axis) over an area graph in Excel. When I have just the area graph, the graph uses the full width of the graph area. When I add the line graph and move it to the secondary axis, gaps appear at the extreme left and right of the area graph.

Area graph, alone: Area graph

Combined graphs: Area graph, with line graph - buggy

Any suggestions or solutions would be greatly appreciated.

1
  1. Make sure that you have both a primary and secondary horizontal axis.
  2. Format both horizontal axis for Axis Position > On Tick Marks.

The secondary axis may not be applied by default: Secondary Axis in Office 2010

You may need to "Add Chart Element" in Office 2016

1

Had the same trouble, but in 2013/2016 there is no "Layout" tab under Chart Tools anymore. I FINALLY found a solution: Chart Tools -> Add Chart Element -> Axis -> Secondary Horizontal This will separate out the x-axis so that your secondary axis will appear above the chart grid itself.

Right click on that new x-axis and select "Format Axis". Under Axis Options, and Axis Position, you will see the On Tick Marks or Between Tick Marks options. Choose the On Tick Marks.

Then you can go back and turn off the Secondary Horizontal option. This will bring you back to just one normal X-Axis and your lines/areas will stretch from one end of the chart to the other!

0

I found a workaround for this problem, after trying to apply the suggestion from dav (but being unable to find that setting in Office for Mac 2011).

I converted the graph type to Area, then made the line thick and the fill transparent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.