0

我又来了 关于 cakephp-2.5 和插件“highcharts”的另一个问题。

我一直在看演示,我能找到的所有不同的东西都是控制器的扩展。但是......这不是必需的,因为它是一个插头,对吗?

因此,我已将插件包含在引导文件中的加载中,当我尝试渲染我的 HighChart 时,我收到以下错误;

Error: Chart: "1" could not be found. Ensure that Chart Name is the same string that is passed to $this->HighCharts->render() in your view.

但是演示工作正常!知道我搞砸了什么吗?名称相同,我什至将它们重命名为“asd”(两者都!),但它仍然不起作用。^^"

4

3 回答 3

1

I know this is an incredibly late response but for the benefit of those still experiencing problems with this, the CakePHP 2.* Highcharts plugin has been updated and is compatible up to CakePHP version 2.5.7.

Do note however that in order to maintain product name consistency throughout the repo, all previous references to "HighCharts" have been changed to "Highcharts" and "high_charts" is now simply "highcharts" . So for eg. you now have to call $this->Highcharts->render() where before you would have used $this->HighCharts->render().

于 2014-12-14T09:16:55.627 回答
0

该插件还不兼容 CakePHP 2.5。目前,正如我们所说,开发人员正在开发 2.5 的新版本。:)

于 2014-06-22T09:25:41.343 回答
0

在 CakePHP 2.5 中,您可以避免上述错误并通过调用它来呈现您的图表。例如,在控制器内的 index() 中,使用:

$this->bar();

在此示例中,bar() 是包含图表的函数的名称。

于 2014-09-16T09:27:23.567 回答