开发者

Google bar chart not allowing me to label two bars?

开发者 https://www.devze.com 2022-12-29 13:29 出处:网络
Take the following chart. 开发者_JAVA百科Everything is as I want except the 2nd label, \'Two\', is being ignored, and the first label is being centered beneath both bars. Any idea what I\'m doing wron

Take the following chart. 开发者_JAVA百科Everything is as I want except the 2nd label, 'Two', is being ignored, and the first label is being centered beneath both bars. Any idea what I'm doing wrong?

http://chart.apis.google.com/chart?cht=bvg&chs=200x200&chd=t:10|80&chco=000000,333666&chxt=x,y&chl=One|Two


I think I've fixed it for you. Here's the code:

https://chart.apis.google.com/chart?cht=bvg&chs=200x200&chd=t:10,80&chco=000000|333666&chxt=x,y&chl=One|Two

And here's the chart:

alt text

The problem was you used a pipe to delimit your chart data. That is you had:

chd=t:10|80

When you should have used a comma:

chd=t:10,80

You'll also need to update the delimiting on your color codes to use a pipe instead of a comma

chco=000000|333666
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号