(Line Chart) different colors for single line if above or below 50 on scale on 0/100?

40 views
Skip to first unread message

Richie Brereton

unread,
Mar 16, 2019, 4:49:58 AM3/16/19
to Google Visualization API
Hi there,
              I was wondering if anyone would know how to do the following:

A standard line chart with a scale of 0 to 100, can I make the single line change color to red if below 50 and green for above 50?

I am pretty new to the Google Visual API.

cheers!
Rich

Daniel LaLiberte

unread,
Mar 16, 2019, 12:07:47 PM3/16/19
to Google Visualization API
Hi Richie,

We don't have support for styling the line based on whether it is above or below some value.  To do that properly, we would have to find the intersection point of the line with your threshold, which is certainly doable and perhaps some day we will get around to it.  

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/2f18bfdb-32fb-428b-9dd4-f3e49a0c7454%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Richie Brereton

unread,
Mar 16, 2019, 8:23:47 PM3/16/19
to Google Visualization API
Hi Daniel,
                Thanks for getting back to me.

cheers
Richie

Tony Goodchild

unread,
Mar 18, 2019, 1:10:33 AM3/18/19
to Google Visualization API
As a workaround you could possibly run through the data and then plot as different datasets on the chart(one for values under the threshold and one above) assigning different colors to each.


Richie Brereton

unread,
Mar 18, 2019, 3:18:26 AM3/18/19
to Google Visualization API
Thanks Tony, I have instead done a transparent image overlay with the areas of interest a different colour which will work just as well.

cheers
Richie
Reply all
Reply to author
Forward
Message has been deleted
0 new messages