Lets say I just have a single line chart with values: {-5, -4, -3, -2, -1, 0, 1 , 2, 3, 4, 5}.
I just want ONE single line to appear on my plot, but all data points corresponding to negative numbers have 1 color, the data point corresponding to 0 has another color, and all positive data points have another color. Is this even possible? The only thing I can think o right now is to create 3 different "series"... but that's not what my manager wants.
multiple colors on one series on line chart
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
Re: multiple colors on one series on line chart
Yes, it is possible. This question has been asked so many times in the forum, I am surprised you didn't find any examples. Search for "color based on value" and my name as the author, and you will find numerous examples with code. Someone even asked this question today, and the thread is four below this one at the time of this posting. If you cannot figure out which one it is, it is called Custom Color Based on value of dataset item. People need to learn how to search for information and read manuals. I am adding this question to the FAQ list, so there should be no excuse in the future.paololim wrote:Lets say I just have a single line chart with values: {-5, -4, -3, -2, -1, 0, 1 , 2, 3, 4, 5}.
I just want ONE single line to appear on my plot, but all data points corresponding to negative numbers have 1 color, the data point corresponding to 0 has another color, and all positive data points have another color. Is this even possible?
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA