+ Reply to Thread
Results 1 to 7 of 7

Why can you not (seemingly) format x-axis colours in line charts

  1. #1
    Registered User
    Join Date
    11-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question Why can you not (seemingly) format x-axis colours in line charts

    Hello there,

    This is my first post so please go easy on me.

    I have been looking at some line charts I have been building, and part of the requirement was to apply different colour formats to the x-axis, so negative values in red, positive black, now I thought this would be pretty straightforward, but I found when writing the formatting, you could apply a custom format, but it wouldn't pick up in the chart....strangely, you can do the same thing with the y-axis without any trouble. I have found that this isn't true when using scatter charts, but is for bar and line.

    I have found a work around for it, by applying two separate series, using the categories, and implementing it as a pseudo x-axis...but its a bit of an ugly solution and I would be interested to know if there is a way to use the colour formatting on the x-axis, and if not, why not?

    Thank you.

  2. #2
    Forum Contributor
    Join Date
    11-07-2012
    Location
    .
    MS-Off Ver
    2003 - 2013 for Windows
    Posts
    121

    Re: Why can you not (seemingly) format x-axis colours in line charts

    Hello,

    the X axis is the line that borders the bottom part of the plot area. It has one color. That color can be set in the x axis properties. I'm not really sure you want to color the X axis, but I think you want to color the actual line in a line or XY chart. Can you clarify?

    In a column chart, Excel offers the option to "invert if negative" so a negative value in a column chart is assigned a different color than the positive data points. That makes sense, since in a column chart, the bars represent the actual values of the data points.

    But with a line chart, this option is not offered. Why not? Well, a line or XY chart combines data points and plots a line between two values. If the first value is 1 and the second value is -1, what color should the line have? The line does not plot the actual data points, but just connects them.

    I think you may want to post a file showing what you expect to see. It would certainly clear up the confusion of "x-axis color".
    regards, LMP

  3. #3
    Registered User
    Join Date
    11-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Why can you not (seemingly) format x-axis colours in line charts

    Thanks for the response. I should have been clearer. I was trying to format the x-axis labels, red where the label values are negative, black where they are positive, on a line chart I could not do this, not by linking to the data or custom formatting through the 'format axis' option.

    I have solved the issue by using a scatter graph and setting the lines.

    What I was really interested to understand is why the x-axis labels where not responding to formatting, when the y-axis labels would in a line chart, and why then this doesn't apply to scatter charts. Excel glitch?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,468

    Re: Why can you not (seemingly) format x-axis colours in line charts

    I just created this xy-scatter chart and both axes and data labels reflected the negative red and positive black formatting.

    Not sure what you are doing, maybe an example would clarify.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Why can you not (seemingly) format x-axis colours in line charts

    in an xy chart both axes are value axes; in line and bar charts the x axis is category (or timescale) so the labels are text and not numbers and your formats do not apply
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Registered User
    Join Date
    11-20-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Why can you not (seemingly) format x-axis colours in line charts

    Thank you, makes sense, although it would be helpful if the link to the source allowed you to apply that formatting, but it doesn't seem to

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Why can you not (seemingly) format x-axis colours in line charts

    I agree :-)

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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