Color bars in Google Chart by their value
<p>I'm trying to color the bars in a Google Charts bar chart by their value. I know from the documentation that I can specify a style role to color specific bars a specific color, but I haven't been able to locate an example showing whether it's possible to color bars by their value. </p>

<p>I have created a fiddle demonstrating my chart structure. My data is a continuous series of integers. </p>

<pre><code>var data = google.visualization.arrayToDataTable([
  ['Asset','Days in Stock'],
  ['4990/473',606],['4990/489',504],['4990/557',159],['4990/559',147],
  ['4990/578',87],['4990/581',63],['4990/582',53],['4990/586',41],
  ['4990/590',25],['4990/592',20],['4990/593',5],
]);
</code></pre>

<p>I haven't been able to determine from the documentation whether it's in fact possible to set threshold ranges for setting the bar colors. Ideally I'd want to be able to use a range formatter but it doesn't seem to work with the bar chart type.</p>

<pre><code>var formatter = new google.visualization.TableColorFormat();
formatter.addRange(0, 60, 'green', '#00ff00');
formatter.format(data, 1);
</code></pre>

<p><a href="https://jsfiddle.net/dL997yv6/" rel="nofollow noreferrer">https://jsfiddle.net/dL997yv6/</a></p>

<p>So if there is a way to do this using a format function that would be ideal, however if there isn't then I will settle for programmatically setting the color per bar using my data values in my scripting language.</p>