You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

how to cause negative numbers in a chart to show in a different color

This seems a simple thing, yet I find no way to do it. I have a chat that shows both positive numbers and negative numbers. When the bar drops below 0 I want the color to change to red. How?

MacBook Pro with Retina display, OS X Yosemite (10.10.1)

Posted on Feb 23, 2015 9:02 AM

Reply
34 replies

Feb 23, 2015 11:37 AM in response to JessHHerbst

Add two columns to your table where you have one column that only includes positive data and another that includes negative data.


for positive data the formula would be something like (assuming original data is in column B)

=if(B>=0, B, "")


for negative data the formula would be:

=if(B<0, B, "")


then plot the columns two columns. set the negative series to be red.


User uploaded file


I reordered the columns so that original data is last (to make crating the chart easier)

Nov 22, 2015 9:56 AM in response to tpmer

If you are doing only one series of data, use formulas to split it into columns of positive and negative values. Plot those two columns as a 2D stacked chart. The spacing will be equal between all bars. Positive can be one color and negative another. This only works if charting one series of data.


C = IF(B>0,B,0)

D = IF(B<0,B,0)

Plot those two columns as stacked bars. Choose the chart option to show hidden data Hide those two columns.


User uploaded file

Dec 22, 2016 6:57 AM in response to Yellowbox

Ian,


Thanks for the suggestion but I obviously wasn't clear enough about what I was trying to do. I want the mix of bar and line shown here, but I want the bars to be one colour for positive values and another for negative.


Using the "separate rows for positive and negative" can get this:

User uploaded file

which is OK but the red and black columns are differently aligned (black x.01 to x.49, red x.51 to x.99)


What I want is something like:


User uploaded file

which I've achieved by overlaying two charts

Feb 24, 2015 6:53 AM in response to JessHHerbst

Jeff,


Curious about your use case. In a table a red font make sense as a visual cue for negative numbers. But in a chart you already have a prominent visual cue: the downward direction of the columns. Isn't color best reserved for showing other things in charts -- different series, etc.?


No doubt Excel charts can be "tortured" to do what you want. I find them amazingly customizable. But Numbers is pretty good on visual esthetics in charts, and Wayne has shown you an easy way to do what you want.


SG

Feb 24, 2015 5:32 PM in response to JessHHerbst

How do you do this in Excel? I am looking for the option but not finding it. I am not a power user of Excel, though.


I don't know why you are adverse to creating new columns. The typical way to do it for a single series in Numbers has been suggested already, use a formula to create a column of the positive values, another formula to create a column of the negative values, and plot both columns. I prefer a stacked bar chart because it preserves the correct bar spacing on the chart.


But you are plotting two columns of data already. For that, there is no good solution. You would have to create two stacked bar charts and overlay them to look like one. We showed that recently in another thread.

how to cause negative numbers in a chart to show in a different color

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.