gpt4 book ai didi

PHP数组到谷歌图表系列数组

转载 作者:行者123 更新时间:2023-12-04 06:25:27 26 4
gpt4 key购买 nike

我有以下 php 数组

Array ( [0] => 
Array ( [year] => 2009
[month] => January
[month_sales] => 728
[year_totalsales] => 2663 )
[1] =>
Array ( [year] => 2009
[month] => February
[month_sales] => 640
[year_totalsales] => 2663 )
[2] =>
Array ( [year] => 2009
[month] => March
[month_sales] => 636
[year_totalsales] => 2663 )
[3] =>
Array ( [year] => 2010
[month] => January
[month_sales] => 636
[year_totalsales] => 2663 )
[4] =>
Array ( [year] => 2010
[month] => February
[month_sales] => 23
[year_totalsales] => 2663 ) )

如何让它在 Google 图表中显示?

最佳答案

请注意,Oliver 的答案是针对(静态)Image Chart Google API 的,该 API 正在折旧且在 2015 年之后不再可用。(我没有足够的代表发表评论)

此类旨在帮助将 PHP 与当前的 Google Chart API 一起使用。我还没有自己使用/测试它们,但从示例中似乎很直接。

https://code.google.com/p/php-class-for-google-chart-tools/

关于PHP数组到谷歌图表系列数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6095512/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com