如何在Google Image Charts中更改饼图默认标签的颜色和大小?

时间:2011-09-09 11:45:03

标签: google-visualization pie-chart

是否可以在Google Image Charts API中更改默认饼图标签的颜色和字体大小(在此简单示例中为“Hello”和“World”)?我搜索了文档,但我无法弄清楚如何做到这一点......

示例代码:

https://chart.googleapis.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World

enter image description here

1 个答案:

答案 0 :(得分:3)

enter image description here

https://chart.googleapis.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World&chxs=0,008000,16&chxt=x

您定义chxt = x 然后使用此格式的chxs设置颜色

chxs=0,{color_code},{font-size}