change background color of Last row only in a table

423 views
Skip to first unread message

ram prasad

unread,
Apr 20, 2012, 9:22:02 AM4/20/12
to Google Visualization API
Hi,
 
   I  want to change background color of Last row only in a table. The ColorFormatter- format method  is applied for  column index only. So i tried to cssClassnames.

      In css:

.orange-background {
    background-color: orange;
}

      In javascript:

var cssClassNames = {
'headerRow': 'orange-background large-font bold-font'  //it changes the table header row only,I want to change last row.
};

var options = {'showRowNumber': true, 'allowHtml': true, 'cssClassNames': cssClassNames};

Please help me to resolve this issue.

--
BY

R.RAMPRASAD


ChartMan

unread,
Apr 23, 2012, 4:04:34 AM4/23/12
to google-visua...@googlegroups.com
Hey

The cssClassNames options has only a fixed set of elements it can operate on. See list here: https://developers.google.com/chart/interactive/docs/gallery/table#customproperties
To operate only on one row you can do one of the following:
- use cell 'style' or 'css' for each cell in the relevant row
- use custom cell html markup


HTH
ChartMan



--
BY

R.RAMPRASAD


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

ram prasad

unread,
Apr 23, 2012, 6:04:13 AM4/23/12
to google-visua...@googlegroups.com
Thank You ChartMan...I used setproperty method for Datatable to change every cell color.It works fine.
--
BY

R.RAMPRASAD


Reply all
Reply to author
Forward
0 new messages