• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

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

bigjohn

New Member
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.
 
BigJohn


A vertical line won't need the Secondary Axis as it will use the same Horizontal and Vertical scales as the existing data


Can you post a sample file with some data and describing the problem, Refer: http://chandoo.org/forums/topic/posting-a-sample-workbook
 
Hi ,


Can you check out these links :


1. http://www.officetooltips.com/excel/tips/how_to_add_a_vertical_line_to_the_chart.html


2. http://peltiertech.com/Excel/Charts/AddLineVertSeries.html


3. http://peltiertech.com/Excel/Charts/AddLineVertErrBar.html


4. http://www.andypope.info/charts/averageline.htm


Narayan
 
BigJohn


As you've probably found out there is no way to add a Vertical line or any other line to a Stock Chart style chart.


You do have 1 option


You can setup a totally separate chart with just the Vertical Line in it

Set the same Horizontal and Vertical axis as the other chart

Then put the new Chart directly in front of the Stock chart and line it up

Set the chart and Plot area to have no color


Messy but it will work
 
Often you'll need to add the existing data to the chart so that it scales the same

Then set all the other series, except the vertical line, to have no color as well

Obviously it can't be a Stock Chart
 
Hi Hui ,


What you have said about not being able to combine stock charts and any other kind of chart is correct only to a certain extent.


Check out this stock chart like chart , with one other line series , and a vertical line , which can be configured , by changing the time in cell W1.


http://speedy.sh/5AxJq/Bigjohn-Book2.xlsx


Narayan
 
Back
Top