Add vertical line to 2 graphs with different scale x-axis at the same time

DavidRoger

Board Regular
Joined
Oct 2, 2011
Messages
135
Two graphs with different scale x-axis.
Graph No. 1 with smaller time frame, Daily.
Graph No. 2 with larger time frame, Weekly.
Objective: Add vertical line to mark the same times in both graphs.

Trouble is both graph already utilise the secondary axis.
VBA is allowed.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
There are probably multiple ways of doing this but they will depend on the kind of chart you have -- XY Scatter / Line / something else.

Two graphs with different scale x-axis.
Graph No. 1 with smaller time frame, Daily.
Graph No. 2 with larger time frame, Weekly.
Objective: Add vertical line to mark the same times in both graphs.

Trouble is both graph already utilise the secondary axis.
VBA is allowed.
 
Upvote 0
I was struggling with this - I was hoping to add a second High-Low Series to the same axis but it doesn't want to play (if you know how to add a second OHLC to the same axis then I think I could tweak it down to a HL series, then I'd only have one bar in that series (all the others being blank); this looked promising as I could get a single vertical line placed at the right place when it was the only stock chart on that axis.
Next I wanted to add a column chart - single bar as before, but it didn't want to combine stock and bar charts.
Next I explored vertical error bars on a stock chart with one point and this looks the most promising, I just need to calculate the y-value for that point and the length of the error bars (or have just the minus error bar going down to 0 and set the y-axis minimum according to the other series).
But I find the link you provided fails - have you withdrawn the file?
 
Upvote 0

Forum statistics

Threads
1,214,629
Messages
6,120,630
Members
448,973
Latest member
ChristineC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top