我正在使用术语云图表,但我无法更改默认使用的颜色。如何为Google Charts的TermCloud图表提供自定义颜色?
目前,它使用一些蓝色和黑色阴影。
Code sample是正在尝试,并试图通过提供选项
var options = {
title: '',
width:200, height:200,
color : 'red'
};
变色有没有什么办法来改变条款的颜色?
我正在使用术语云图表,但我无法更改默认使用的颜色。如何为Google Charts的TermCloud图表提供自定义颜色?
目前,它使用一些蓝色和黑色阴影。
Code sample是正在尝试,并试图通过提供选项
var options = {
title: '',
width:200, height:200,
color : 'red'
};
变色有没有什么办法来改变条款的颜色?
尝试使用background-color
而不是color
,同样,如果您已经将其他颜色应用于相同的变量,那么它将不起作用。
P.S.使用分号,而不是逗号。
的TermCloud visapi小组件包括http://visapi-gadgets.googlecode.com/svn/trunk/termcloud/tc.css
.term-cloud {font-family: arial; font-size: 10px; }
.term-cloud-1 {font-size: 10px; color: #acc1f3; }
.term-cloud-2 {font-size: 14px; color: #86a0dc; }
.term-cloud-3 {font-size: 18px; color: #607ec5; }
.term-cloud-4 {font-size: 22px; color: #264ca2; }
.term-cloud-5 {font-size: 26px; color: #133b97; }
.term-cloud-6 {font-size: 32px; color: #002a8b; }
.term-cloud-7 {font-size: 36px; color: #071a41; }
.term-cloud-8 {font-size: 40px; color: #081122; }
.term-cloud-9 {font-size: 44px; color: #000000; }
.term-cloud-error {font-family: arial; font-size: 10px; color: red; }
.term-cloud-link {text-decoration: none; }
.term-cloud-link:hover {text-decoration: underline;}
自定义CSS你可以换成你自己提供的css,指定你喜欢的颜色。这是一个足够简单的块,您可以将它附在您的html文件的<style>
标记中。
它没有工作。 –