+ Reply to Thread
Results 1 to 17 of 17

Can I plot five different sets of values on the x-axis in excel charts?

  1. #1
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Question Can I plot five different sets of values on the x-axis in excel charts?

    How do I plot a line graph with about five different sets of dates and one line per set of dates?

    For example, X axis values required are as follows:

    Site 1: Jan 15 - Jun 15, Jul15 - Dec 15, and so on
    Site 2: Feb 16 - Jul 16, Aug 16 - Jan 17, etc.
    Site 3: Different dates
    Site 4: Different dates
    Site 5: Different dates

    Looking forward to a response!

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    Can you attach a sample workbook?

    Go Advanced -> Manage Attachments -> Upload

  3. #3
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    Example attached.
    Attached Files Attached Files

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    So the dates are for different time periods? Can you mock-up how you would expect the chart to look? I'm guessing the attached is not what you want.
    Attached Files Attached Files

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

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    I will agree with kersplash, it would be nice to have an idea of what you expect the chart to look like. What kersplash has done is basically chart the 5 data series against "month number" (you can see it in his chart if your format the horizontal axis to have a general number format). This makes sense, but it doesn't seem to fit the idea of charting against 5 different date series. If his chart is what you are after, then most of what I say here probably can be disregarded.

    In my experience, having multiple sets of "x values" is fairly difficult with a line chart, but very easy using an XY scatter chart (both chart types can be formatted to display lines without markers). The only disadvantage that I see with an XY scatter chart is you won't have the nice "date axis" options that a line chart offers. If you can get by without the date axis, then the easiest would be to use an XY scatter chart.

    If you decide that you must have the date axis, then I would do one of two things:
    1) Build the chart with one data series as a line chart series and the other series as XY scatter chart. Format the primary and secondary horizontal axes so that they have the same min and max values/dates (you will need to figure out the serial numbers that correspond to the min and max dates you want to use for the axes). Format the primary and secondary vertical axes so they have the same min and max values as well. Then, if desired, hide (format as no line no label) the secondary axis system.
    2) Arrange the data in the spreadsheet so that all 5 series can be plotted against one set of x values. The usually means a strategic use of formula induced "blanks" (see this essay: https://peltiertech.com/mind-the-gap...g-empty-cells/ ) and probably some other tricks to get the line chart to look right.

    Help us understand exactly what you want the chart to look like, and we can help you put it together.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    Yes time periods are different.

    Rolling time periods for project being implemented at different sites so some overlap.

    Project implementation date was different for each site - denoted by green line in graph.

    Attached is a mock up I have done.

    thank you for your help.
    Attached Files Attached Files

  7. #7
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    You may have to organise your data source using a different method?

  8. #8
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    How does one build a chart with one data series as a line chart and the other as a XY scatter chart?

  9. #9
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    Sorry you have lost me there. How do you mean?

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

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    How does one build a chart with one data series as a line chart and the other as a XY scatter chart?
    By selecting a data series and changing its chart type: https://support.office.com/en-us/art...F-DA021177452F note the two different parts to step 1.

    It might be easier to create the chart as an XY scatter chart from the beginning, add all of the data series, then change one of the data series to a line chart type (rather than start with a line chart type and change 4 data series to XY scatter).

  11. #11
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    ok thank you got past the combo chart creation... but now I need help with this bit:

    Format the primary and secondary horizontal axes so that they have the same min and max values/dates (you will need to figure out the serial numbers that correspond to the min and max dates you want to use for the axes). Format the primary and secondary vertical axes so they have the same min and max values as well. Then, if desired, hide (format as no line no label) the secondary axis system.

  12. #12
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    thank you but how can I do this?

    Format the primary and secondary horizontal axes so that they have the same min and max values/dates (you will need to figure out the serial numbers that correspond to the min and max dates you want to use for the axes). Format the primary and secondary vertical axes so they have the same min and max values as well. Then, if desired, hide (format as no line no label) the secondary axis system.

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

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    In what way? Can I assume you know where to find the format axis dialog (right click the desired axis and select "format axis")? Can I assume that your real question is how to determine the date serial number? I usually enter the date into a cell in Excel, then change the number format from whatever date format Excel defaults to to a "general" or "fixed" number format. Doing this, I can see that January 1 2014 is serial number 41640 and September 1 2018 is 43344 (review something like this if you are unfamiliar with how Excel stores dates and times: http://www.cpearson.com/Excel/datetime.htm ).

  14. #14
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    hi there. thank you for your patience with this thread. I have formatted the axis as well as changed the date to a serial number. However, upon assigning the minimum and maximum axis values, I do not get any graphical readings. Please note I am using ranges rather than single dates e.g. Jan 14 - Jun 14, Jul 14 - Dec 14 and so on. Even if I replace these with just Jun 14, Dec 14, etc. on both the data table as well as the axis values, I get no graph showing. I must be missing a step. thanks again.

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

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    I'm not sure I understand what you have now. Can you upload a new sample?

    Please note I am using ranges rather than single dates e.g. Jan 14 - Jun 14, Jul 14 - Dec 14 and so on.
    Are you saying that your dates for the date axis are not really dates but text strings? A scatter chart overlays on a text/category axis differently. We need to be clear on exactly what you are trying to use for your x axis data. Your first sample showed dates as date serial numbers, your second sample did not show dates. We need to a good sample of your data (suitably anonymized) in order to understand exactly what you are trying to do.

    What I had in mind was starting from the sample in post #3 where you had real dates for the x axis data. The steps I took:

    1) Select the Brisbane data (B3:H4) and insert scatter chart.
    2) Bring up the select data dialog and add the data series for the other cities.

    At this point, you should have a chart with all of the data plotted according to date (including year, so Brisbane's data,which is all 2014 will be to the left of the other cities which are different years). It should be real close to what I think you are trying to do, and you may not need to do anything more. If you are confused by the whole scatter+line combination chart, it will probably be easiest to just stop here.

    3) If you really want the date axis, select the Brisbane data series and change the chart type of this data series to line. See if that is better.

    Is that close to what you want?

  16. #16
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    I think I may have a solution close at hand. I have used the line + scatter combination so that the axis shows my date ranges (which now that you say it I agree are text strings, sorry about the approximate sample - that was an attempt to create a mock view but missed some details).

    I have arranged my data in sequential order and can now see how the data is trending across multiple sites. I will present this to the powers to be and see how it goes. If not, I may be back for some help. Thank you both Kersplash and Mr Shorty for your combined efforts with this

  17. #17
    Registered User
    Join Date
    11-20-2018
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    11

    Re: Can I plot five different sets of values on the x-axis in excel charts?

    thank you, that worked a treat. Much appreciated!

+ 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. How do I plot multiple x-axis series in excel charts
    By bdorr in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-22-2018, 08:52 PM
  2. How to add two sets of values to the X-Axis of a graph?
    By Sciguy25 in forum Excel General
    Replies: 1
    Last Post: 07-01-2012, 06:35 AM
  3. Excel chart. Displaying y axis numbers different to actual plot values.
    By Richard Buttrey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2011, 12:40 PM
  4. Limiting Values of Y-Axis in Excel Charts??
    By KoolSIM in forum Excel General
    Replies: 6
    Last Post: 04-02-2009, 10:18 AM
  5. Scatter Plot with Two Sets of Y Values ???
    By malcolm347 in forum Excel General
    Replies: 1
    Last Post: 02-05-2009, 12:44 AM
  6. 2 sets of values on x-axis
    By sammutandrew in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-23-2007, 03:31 PM
  7. Excel Charts X Axis values as dd/mm/yy hh:mm
    By PeterS in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-30-2006, 10:15 AM
  8. Hiding Values Below Z Axis Minimum Value on Axis Charts
    By TryingToExcel in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-18-2005, 11:06 AM

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