Hi.

You can add your own styling after the formatter has done its job.
For instance,

  data.setProperty(2, 1, 'style', data.getProperty(2, 1, 'style') +
'font-size:20px;');

Hope this helps,

  Viz Kid

On Fri, Mar 5, 2010 at 5:21 PM, Nate <[email protected]> wrote:

> I am using a Table and want to control the background color and the
> text size.
>
> I do the following to control the text size and it works.
>
>          var data = new google.visualization.DataTable();
>          data.addColumn('string', 'Name');
>          data.addColumn('number', 'Code');
>          data.addRow();
>          data.setCell(0, 0, 'nate', null, {style: 'font-style:bold;
> font-size:10px;'});
>          data.setCell(0, 1, 2);
>
>          viz= new
> google.visualization.Table(document.getElementById('tableContainer'));
>
>          viz.draw(data, {allowHtml: true, showRowNumber: false});
>
> When I add the following Colorformatter to control the background/
> foreground colors the text size reverts to the default, 13px I
> believe.
>
>          var formatter = new google.visualization.ColorFormat();
>          formatter.addRange(0, 1, 'red', 'red');
>          formatter.addRange(1, 2, 'yellow', 'yellow');
>          formatter.addRange(2, 3, 'blue', 'blue');
>
>          formatter.format(data, 1);
>
> Is there any way to get these two to work together?
>
> Thanks,
> Nate
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-visualization-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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.

Reply via email to