+ Reply to Thread
Results 1 to 8 of 8

Want to make negative X axis values a different color

  1. #1
    Registered User
    Join Date
    10-20-2014
    Location
    Portland, Maine
    MS-Off Ver
    2010
    Posts
    4

    Question Want to make negative X axis values a different color

    I'm trying to create a bar chart which has both positive and negative X-axis values (X-axis values range from -15 to +20). I see how you can invert the colors of the bars depending on whether the Y values is negative, but I cannot find how to do this when the X value is negative. The scenario here is I'm charting the frequency of arrival times relative to a fixed time (zero) so negative values are early and positive values are late. I'd like to color the columns that are late a different color so they stand out. I'm using Excel 2010

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Want to make negative X axis values a different color

    One way would be to separate the data (early and late), plot as two separate datasets, each with a different colour.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    10-20-2014
    Location
    Portland, Maine
    MS-Off Ver
    2010
    Posts
    4

    Re: Want to make negative X axis values a different color

    I tried doing that with two different data sets on the same chart. But I can't get the X axis configured properly to show both datasets in the correct position along the same X axis. The only way to do that might be to create two different columns of data in Excel, one which contains zeros for all X values below Y zero and the other which contains zeros for all X values above Y zero, then I'd be able to put them on the same chart using the same X axis. Is there a less cumbersome way to do it?
    Last edited by CKWeather; 10-20-2014 at 03:05 PM.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Want to make negative X axis values a different color

    It's not so bad... Can you post an example of your date?

  5. #5
    Registered User
    Join Date
    10-20-2014
    Location
    Portland, Maine
    MS-Off Ver
    2010
    Posts
    4

    Re: Want to make negative X axis values a different color

    Not sure how to upload data on here. But column 1 has numbers from 15 to -20 (this would be X value in chart) representing the time relative to the zero mark. Column 2 has the number of times each case was observed. One example is where column 2 has 1 in 15, 1 in 4, 2 in -1, 1 in -5, 1 in -8, 1 in -9, 1 in -13, 1 in -15, 1 in -18, and 1 in -20. So I've created a nice little bar chart showing the distribution, but I just want to highlight the positive bars (which represent arriving late).

    So yes, I can double these columns and just replace zeros for the above/below zero marks to get two data sets and change the colors of each. But I have dozens of columns already, so doubling them and recalculating each would be a significant effort. I was just hoping there might be another easier way to do it like the "invert colors" button that only applies to the Y axis.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Want to make negative X axis values a different color

    Is this what you had in mind?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-20-2014
    Location
    Portland, Maine
    MS-Off Ver
    2010
    Posts
    4

    Re: Want to make negative X axis values a different color

    Yes that chart is what I had in mind, but it looks like there's 3 times as many columns of data as I started with :/

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Want to make negative X axis values a different color

    That's what happens when we have to guess what your starting point looks like.


    So, please attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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. [SOLVED] VBA- X axis below axis (with negative values)
    By j.lancaster1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2012, 06:06 PM
  2. Negative values in bar chart overlap axis labels.
    By Bonny in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-17-2006, 03:40 AM
  3. Axis labels on negative values
    By gailb14 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 04-19-2006, 12:25 PM
  4. Move the Y axis below negative values
    By Vic Mel in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-14-2006, 10:30 AM
  5. [SOLVED] How to make the cell or font color red if the number is negative?
    By Bob T in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 09-06-2005, 07:05 PM

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