0

我正在为学校制作一个涉及大量 Google 可视化的网站。我可以让他们使用我想要的数据,但我坚持自定义它们。我必须遵循一个非常具体的设计,但目前还没有真正奏效。

原因是我不知道如何在一个元素上拥有两种不同的样式。例如 :

legend: {textStyle: {color: '#d1dbbd', fontName: 'Century Gothic', fontSize: 15}},
legend: {position: 'bottom'},

这目前仅将图例定位在底部。我试图将这两个放在一条线上,但我不知道该语言的正确语法(我试图在网上找到它但无济于事。:()

我已经像这样把它洗了几次

legend: {position: 'bottom'}, {textStyle: {color: '#d1dbbd', fontName: 'Century Gothic', fontSize: 15}},

或者

legend: {position: 'bottom', {textStyle: {color: '#d1dbbd', fontName: 'Century Gothic', fontSize: 15}}},

帮助 ?

4

1 回答 1

0

你很接近格式。您想要一个具有“位置”和“文本样式”属性的对象:

legend: {
    position: 'bottom',
    textStyle: {
        color: '#d1dbbd',
        fontName: 'Century Gothic',
        fontSize: 15
    }
}
于 2013-07-22T21:43:17.063 回答