Cheryl, That works perfectly. I tried many variations of the "options" and could not get it to work the way that I wanted.
On Thursday, April 19, 2018 at 2:30:30 PM UTC-4, Cheryl Evans wrote: > > google.setOnLoadCallback(drawChart); > function drawChart() { > > var data = google.visualization.arrayToDataTable([ > ['Label', 'Value'], > ['Memory', 80], > ['CPU', 55], > ['Network', 68] > ]); > > var options = { > width: 400, height: 120, > redFrom: 30, redTo: 60, redColor:'#00FF00', > greenFrom: 0, greenTo: 100, greenColor:'#FF0000', > yellowFrom:10, yellowTo: 90, > minorTicks: 5 > }; > > var chart = new > google.visualization.Gauge(document.getElementById('chart_div')); > > chart.draw(data, options); > > setInterval(function() { > data.setValue(0, 1, 40 + Math.round(60 * Math.random())); > chart.draw(data, options); > }, 13000); > setInterval(function() { > data.setValue(1, 1, 40 + Math.round(60 * Math.random())); > chart.draw(data, options); > }, 5000); > setInterval(function() { > data.setValue(2, 1, 60 + Math.round(20 * Math.random())); > chart.draw(data, options); > }, 26000); > } > > On Thu, Apr 19, 2018 at 11:28 AM, Michael Thompson <michael.9...@gmail.com > <javascript:>> wrote: > >> I have a WWW page that gets a voltage from an AWS IoT sensor and displays >> the value in a Gauge Chart. >> >> I would like to have one green band that indicates an acceptable voltage >> range, yellow bands above and below the green band that indicates that the >> voltage is a little high or a little low, and red bands above and below the >> yellow bands that indicates that the voltage is a too high or too low. >> >> I have it working with one green, yellow, and red band. >> >> How do I modify the gauge so that I can display two yellow and two red >> bands? >> >> -- >> 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-visualization-api+unsubscr...@googlegroups.com >> <javascript:>. >> To post to this group, send email to google-visua...@googlegroups.com >> <javascript:>. >> 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/96bdef36-f127-4bbb-aa75-aaf6abc075f9%40googlegroups.com >> >> <https://groups.google.com/d/msgid/google-visualization-api/96bdef36-f127-4bbb-aa75-aaf6abc075f9%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@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/9cdd5551-8679-468b-931c-6d7787bc6545%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.