Conditional Formatting of a Line graph color

Hi,


Is it possible to format the color of a line in a graph depending on the values of the data?


Example:


I have two point (p1 and p2) and a line (with a certain color) that connect those points in a graph.


Then I would like that: If p1>p2 the line should be green, while if p1<p2 then it should be red; or if p1=p2 then another color. So actually I would like to be able to change the line color depending on the line slope (positive or negative or 0).


Is this possible?



Thanks!

iMac (27-inch Mid 2010), Mac OS X (10.7.4)

Posted on Jun 14, 2012 9:32 AM

Reply
3 replies

Jun 15, 2012 5:08 AM in response to Dan_kernel

Dan,


Study this example:

User uploaded file


X and Y data pairs are in columns A and B. Those points that are to be plotted with a green connecting line are transferred to column C, those that are to be plotted with a red connecting line are transferred to column D, and those that are to be plotted with a black connecting line are transferred to column E.


Note the gray gaps in the line. That is where there is no data, by which I mean that a data pair falls into one column or another regarding color, and between the data points I have not connected the line of one series to the line of another. I filled in the gaps by plotting column B in gray under the three colored series.


So, you are in charge of what goes into the color columns. If you want to base it on slope, go ahead and write the expression to do that. My example simply uses value thresholds.


Jerry

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.

Conditional Formatting of a Line graph color

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