You need to format the DataTable, not the chart. Also, you have to format
each column individually, you can't pass an array of columns to the
formatter. Use this:
var formatter = new google.visualization.ColorFormat();
formatter.addRange(-20000, 0, 'white', 'orange');
formatter.addRange(20000, null, 'red', '#33ff33');
formatter.format(data, 6);
formatter.format(data, 7);
formatter.format(data, 8);
On Friday, December 7, 2012 7:22:27 PM UTC-5, Jaycee Wilken wrote:
>
> Is there an example of how to format cell colors; where I'm using the
> chartwrapper as this table is associated to control?
>
> I'm not getting this correct.
>
> //the table
> var tableChart = new google.visualization.ChartWrapper({
> 'chartType': 'Table',
> 'containerId': 'table_div',
> 'allowHtml': true,
> });
>
> //binding the controls
> dashboard.bind([filter,categoryPicker], [lineChart,tableChart])
> //creating the formatter
> var formatter = new google.visualization.ColorFormat();
> formatter.addRange(-20000, 0, 'white', 'orange');
> formatter.addRange(20000, null, 'red', '#33ff33');
> formatter.format(tableChart, [6,7,8]);
>
> //draw the dashboard
> dashboard.draw(data)
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/2ANs7ta9FqgJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.