Thanks for the quick reply Dan.  I was hoping that I could use Viktor's 
script to modify my current chart, or to generate a chart with my current 
data.  I've found a somewhat simpler solution that fits my need.


I just made two copies of the same chart and made them inside a worksheet. 
 One copy is on top with axis setup for only positive values (with a green 
line and area), the other is in front of it and axis setup for only 
negative values (with the data line formatted red with a red area).  Then I 
adjusted the size of the plot area so that the "negative" chart's plot area 
extended all the way to the top of the chart.  The bottom of the "positive" 
chart is covered up by the "negative" chart making it looks like a single 
chart with green = positive and red = negative.

Sorry for hijacking the thread everyone (also sorry for posting this all as 
it turns out my problem is more of a Google Sheets thing instead of Charts 
API).

On Thursday, June 2, 2016 at 12:15:55 PM UTC-4, Daniel LaLiberte wrote:
>
> There is no option to just color negative areas differently, although that 
> would be a good idea.  
>
> But you can get a similar effect by filling the negative area with another 
> area chart.  Here is a modification of the previously posted example that 
> does that:  http://jsfiddle.net/bnugqpjx/6/
>
> On Thu, Jun 2, 2016 at 11:50 AM, Tim Korhumel <tkor...@gmail.com 
> <javascript:>> wrote:
>
>> How would I go about implementing this script into an area chart that I 
>> have already generated?  Specifically just the portion that colors the 
>> lines and the area based on the positive/negative value?
>>
>> On Wednesday, September 9, 2015 at 8:50:07 AM UTC-4, Viktor Dimitrov 
>> wrote:
>>>
>>> I wrote a script for areachart but I think the solution is similar. I 
>>> hope it would be helpful.
>>> http://jsfiddle.net/bnugqpjx/3/
>>>
>>> On Thursday, April 14, 2011 at 4:29:57 AM UTC+3, tim wrote:
>>>>
>>>> I don't see anything in the API changing the color of the bar 
>>>> depending on the value.  Is there a way to make it so that negative 
>>>> values are different color than positive ones? 
>>>>
>>>> Thanks.
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google Chart API" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-chart-a...@googlegroups.com <javascript:>.
>> To post to this group, send email to google-c...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/google-chart-api.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
> dlali...@google.com <javascript:>   5CC, Cambridge MA
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-chart-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-chart-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to