Google Charts API 值未对齐

发布于 2025-01-04 20:25:50 字数 1026 浏览 2 评论 0原文

我正在使用 Google Chart API 来显示一些游戏结果,但是,最高值始终显示与绿色条内的边缘对齐,而不是在条上方(或至少在顶部和文本之间有一些填充)。

我使用以下 URL 来生成图表:

[http://chart.apis.google.com/chart?cht=bvs&chd=t:14.1,2.1&chp=1.57079633&chs=300x155&chl=|&chco=43A4 43|D53030|3B74CA|FFDC00&chf=bg,s,00000000&chbh=70&chds=0,14&chm=N*0,FFFFFF,0,-1,20,,ve::15&chp=10 ][1]

这会生成一个如下所示的图表(我需要另外 2 个代表来发布图像,有人可以编辑以包含此图像吗?):

![http://chart.apis.google.com/chart?cht=bvs&chd=t:14.1,2.1&chp=1.57079633&chs=300x155&chl=|&chco=43A443|D53030|3B74CA|FFDC00&chf=bg,s,00000000&chbh=70&chds=0,14&chm=N*0,FFFFFF,0,-1,20,,ve::15&chp=10][1]


  [1]: https://i.sstatic.net/QiE2d.png

实际上,红色条上方有一个 2 已正确对齐,但由于背景SO 上是白色的,它没有显示出来。

我怎样才能让它出现在绿条上方。我已经把 API 拆了一部分,并尝试了几乎所有的组合,但没有成功。

API 参考可在此处获取:http://code.google.com/ apis/chart/interactive/docs/reference.html

I am using the Google Chart API to display some game outcomes, however, the highest value always shows up aligned to the edge within the green bar instead of above the bar (or at least with some padding between the top and the text).

I use the following URL to generate the chart:

[http://chart.apis.google.com/chart?cht=bvs&chd=t:14.1,2.1&chp=1.57079633&chs=300x155&chl=|&chco=43A443|D53030|3B74CA|FFDC00&chf=bg,s,00000000&chbh=70&chds=0,14&chm=N*0,FFFFFF,0,-1,20,,ve::15&chp=10][1]

This generates a chart that looks like the following (I need 2 more rep on SO to post images, can someone please edit to include this image?):

![http://chart.apis.google.com/chart?cht=bvs&chd=t:14.1,2.1&chp=1.57079633&chs=300x155&chl=|&chco=43A443|D53030|3B74CA|FFDC00&chf=bg,s,00000000&chbh=70&chds=0,14&chm=N*0,FFFFFF,0,-1,20,,ve::15&chp=10][1]


  [1]: https://i.sstatic.net/QiE2d.png

There is actually a 2 above the red bar that is aligned correctly, but since the background on SO is white, it's not showing up.

How can I make it appear ABOVE the green bar. I've torn the API a part and tried seemingly every combination with no avail.

The API reference is available here: http://code.google.com/apis/chart/interactive/docs/reference.html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

对不⑦ 2025-01-11 20:25:50

问题出在“chm”上。

我删除了颜色规格,现在链接工作正常。

<一href="http://chart.apis.google.com/chart?cht=bvs&chd=t:14.1,2.1&chp=1.57079633&chs=300x155&chl=|&c hco=43A443|D53030|3B74CA|FFDC00&chf=bg,s,00000000&chbh=70&chds=0,14&chp=10&chm=N,,0,-1,20,,ve::15" rel="nofollow">http://chart.apis.google.com/chart?cht=bvs&chd=t:14.1,2.1&chp=1.57079633&chs=300x155&chl=|&am p;chco=43A443|D53030|3B74CA|FFDC00&chf=bg,s,00000000&chbh=70&chds=0,14&chp=10&chm=N,,0,-1,20,,ve:: 15

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文