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
Sort By: 

Feb 24, 2015 9:27 AM in response to SGIII

the answer seems to be 'No' , numbers will not change the color of a bar, within a chart based on its sign. It certianly will within the cells, which is why I was hopeful. Asking 'why would I want that' is a comment best left unsaid, i asked how to do it, not should I do it.

Reply

Feb 23, 2015 9:34 AM in response to JessHHerbst

use conditional formatting.


select the cell(s) you want to format

open the cell formatter

User uploaded file


click the "Conditional Highlighting..." button

User uploaded file


now click the "Add a Rule..." button to add a new rule:


User uploaded file


for each rule you should add rules that apply to numbers and setup as shown.


Then click "Done"

Reply

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)

Reply

Feb 23, 2015 1:51 PM in response to JessHHerbst

you can use the method I proposed using a separate table that takes input from your original data:

User uploaded file


here

A2=Original Data::A2

B2=IF(Original Data::B2≥0,Original Data::B2, "")

C2=IF(Original Data::B2<0, Original Data::B2, "")


fill down as needed


you can move the "Chart Data" Table out of the way too

Reply

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

Reply

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

Reply

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

Reply

Feb 24, 2015 10:12 AM in response to JessHHerbst

Asking 'why would I want that' is a comment best left unsaid, i asked how to do it, not should I do it.


Ok, but it was a question, not a comment. Sorry you aren't satisfied with efforts of various people to help you here, and apologize for asking about your use case. Let that remain a mystery. 🙂


SG

Reply

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.

Reply

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

The best I get when I do that is white for negative values. Instructions online talk about a "right hand paint bucket" for choosing the other color but I don's see one.


EDIT: I found other instructions that use a 5% fill pattern with a foreground and background color to do it. That works.

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

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.