[英]Set the selected row css properties for a Google Visualization Table Chart
[英]How can I change the css properties of a google visualization table and it columns?
如何更改Google可视化表及其列的CSS属性? 我已经在开发人员网站上阅读了如何调整单个单元格和行的背景,文本颜色等信息,但是没有关于如何调整列或表格边框,颜色,填充等的信息。
这段代码来自google dev网站 ,示例也可以在本文中找到。
CSS属性:
<style>
.orange-background {
background-color: orange;
}
.orchid-background {
background-color: orchid;
}
.beige-background {
background-color: beige;
}
</style>
表格代码:
var cssClassNames = {
'headerRow': 'italic-darkblue-font large-font bold-font',
'tableRow': '',
'oddTableRow': 'beige-background',
'selectedTableRow': 'orange-background large-font',
'hoverTableRow': '',
'headerCell': 'gold-border',
'tableCell': '',
'rowNumberCell': 'underline-blue-font'};
var options = {'showRowNumber': true, 'allowHtml': true, 'cssClassNames': cssClassNames};
var data = new google.visualization.DataTable();
//... add data here ...
var table = new google.visualization.Table(container);
table.draw(data, options);
没有任何类名属性可以整体引用列或表 。 我的首要任务是消除外部的桌子边框,并调整列宽,以使整个桌子更小。
提前致谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.