+ Reply to Thread
Results 1 to 2 of 2

plot on primary &secondary y axis for corresponding x axis values

  1. #1
    Registered User
    Join Date
    11-29-2020
    Location
    india
    MS-Off Ver
    2021
    Posts
    92

    plot on primary &secondary y axis for corresponding x axis values

    i hvae 2 sheets base and open...both have dates n prices ...with some dates being common....i m trying to plot both on same chart both get plotted on same x value even though the dates differ...like in sheet base has the date starts from 20-2-2001, but in sheet open the data starts from date 01-02-2001....and when plotting both start from same point....what i want it the values of sheet data get plotted only from 20-01-2002 n not from start...i m attaching the sheet fo better clarity incase i sound jumbled up n m not clear
    chartin2.xlsx
    Last edited by littleangel; 06-20-2023 at 12:48 PM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: plot on primary &secondary y axis for corresponding x axis values

    Here's what I did in your chart:

    1) In a line chart with date axes, when you want two data series to use different date ranges, you need to show both the primary and secondary horizontal axes. The first thing I do is have the chart show the secondary horizontal axis.
    2) I immediately notice that the secondary axis defaults to categories/dates of 1, 2, 3.... This indicates that the "base" data series does not have a horizontal category axis range associated with it. I bring up the Select Data dialog, select the "base" data series in the box, and edit the horizontal category axis data series for this data series to be chartin.xlsx!range.Ddate. Excel automatically replaces the count numbers on the horizontal axis with the correct dates.
    3) Now that both data series are being plotted correctly against the dates on the corresponding axis, the final step is to format the primary and secondary horizontal axes to show the same date range. Over both data series, the data span from 1 Feb to 2 Apr, so I format both axes to have 1 Feb as the minimum date and 2 Apr as the maximum date.

    This will work just fine as long as you have no more than 2 sets of dates to use for the horizontal axis data across your data series. If you ever need 3 or more, then you will need to either switch to an XY scatter chart instead of a line chart, or you will need to do something to combine all of the data for the chart into a single table.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 08-30-2022, 09:02 AM
  2. [SOLVED] Align primary and secondary x-axis in combination plot
    By jimjones1958 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-24-2020, 05:19 AM
  3. Replies: 5
    Last Post: 05-03-2020, 06:01 AM
  4. pivot with primary axis 2 tables as input and secondary axis the same unit?
    By Johan Tielens in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-19-2020, 04:52 PM
  5. Replies: 4
    Last Post: 05-17-2012, 11:25 AM
  6. Replies: 6
    Last Post: 12-07-2010, 02:54 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1