问题标签 [phpgraphlib]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
66 浏览

php - 如何将数组作为可选参数传递并对其进行迭代?

我正在尝试修改 phpgraphlib,以便在使用多种条形颜色时生成图例。我在 generateLegend() 中添加了一个带有颜色的数组作为可选参数,但它似乎不起作用。我不知道怎么了。我以前没有使用 PHP 的经验,但在我看来,必须可以将数组作为可选参数传递这是我的代码:

这是调用该函数的代码:

编辑: generateLegend() 使用以下代码调用:

为了便于阅读,我省略了大部分代码,但我可以看到该方法已被调用(因此我在代码确实得到的地方添加了注释)

0 投票
1 回答
95 浏览

php - 无法向 PHPGraphLib 的远程 API 添加和呈现多集数据

我正在为库使用远程 API。

我的数据结构

错误

使用单个数据集可以正常工作,但我无法加载多个数据集。

有什么建议么?

0 投票
1 回答
259 浏览

php - phpgraphlib A non-numeric value encountered for php version 7.1

I was using PHPGraphLib for my php version 7.0 and it was working absolutely fine. However, I have switched my local server from 7.0 to 7.1 and now it has started giving me an error saying..

A non-numeric value encountered

at /my_website_path/phpgraphlib.php line 987

Hence I went to this particular line and found this code at line number 987.

And changes this chunk of code to this (Ref https://github.com/elliottb/phpgraphlib/issues/30#issuecomment-394975371 ).

And I have successfully surpassed this error. But now I am getting another error saying..

A non-numeric value encountered

at /my_website_path/phpgraphlib.php line 381

I went here and found this code.

And tried to replace with this code.

Yes I am unable to make it work in my php version 7.1

I have tried to find ways and researched but yet to find which works for me.

I have also tried to search this library which is working for 7.1 but it seems like they have not upgraded to php 7.1 yet.

Can someone guide me how can I overcome these issues and make it somehow work for my latest php version.

0 投票
0 回答
13 浏览

phpgraphlib - PHPGraphLib 不支持 PHP 7.2

PHPGraphLib 不支持 PHP 7.2。我启用了 GD 库。

面临的问题:图像无法显示,因为它包含错误

请建议。

注意:PHPGraphLib 支持 PHP 5.6