I am building a table in google graphs. I would like to change the color of a cell based on the numeric value of a cell. I am assuming I will do something like iterate through all of the cells and call the colorFormat object specified in docs here: https://developers.google.com/chart/interactive/docs/reference#colorformatter
The problem is that there are no examples of exactly how to implement this method.
Does anyone know of an example or how the colorFormat can be implemented to change the color of cells?
https://developers.google.com/chart/interactive/docs/reference#colorformatter - did you scroll farther down?
var formatter = new google.visualization.ColorFormat(); formatter.addRange(-20000, 0, 'white', 'orange'); formatter.addRange(20000, null, 'red', '#33ff33'); formatter.format(data, 1); // Apply formatter to second column