Apple Event: May 7th at 7 am PT

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
Question marked as Best reply

Posted on Feb 23, 2015 9:34 AM

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"

34 replies

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 2:33 AM in response to Badunit

This works well and avoids the problem which the previous solution had of the two series being half-width and differently aligned when plotted. As the answer says, this works for a single series of data. I wanted this type of plot for one series and a line graph for another series. I did this by plotting the line graph and bar chart separately but using the same scaling for the axes and overlaying the two graphs. A bit fiddly but looks great. Maybe could achieve in Excel but I much prefer the look of Numbers charts.

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

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 ID.