简体   繁体   English

在JavaScript中使用TeeChart PHP

[英]Using TeeChart PHP with javascript

I'm trying to use TeeChart PHP. 我正在尝试使用TeeChart PHP。 I use Laravel 5.1 framework on a Ubuntu 15.04 machine. 我在Ubuntu 15.04计算机上使用Laravel 5.1框架。 So far, I've been able to include the librairy in Laravel. 到目前为止,我已经可以将拉里维里的图书馆包括在内。 I put the TeeChartPHPOpen folder into vendor, added TChart.php in Composer.json -> autoload -> files, did run composer dumpautoload . 我将TeeChartPHPOpen文件夹放入供应商,在Composer.json-> autoload->文件中添加了TChart.php,确实运行了composer dumpautoload Also, I did install the GD extension with sudo apt-get php5-gd and I did restart my web server (still on artisan). 另外,我确实使用sudo apt-get php5-gd安装了GD扩展,并且确实重新启动了Web服务器(仍然在artisan上)。

I did some tests with the Steema's demos on http://www.steema.com/products/teechart/php/demos/Features/index.html . 我在http://www.steema.com/products/teechart/php/demos/Features/index.html上对Steema的演示进行了一些测试。 Here are my problems: 这是我的问题:

  1. With the example using JavaScript, Laravel flag me an error : 在使用JavaScript的示例中,Laravel向我标记了一个错误:

Call to undefined method ImageExport::getJavaScript() 调用未定义的方法ImageExport :: getJavaScript()

I looked into the ImageExport file and don't find any trace of getJavaScript function. 我查看了ImageExport文件,没有发现任何getJavaScript函数的痕迹。

  1. I did try another example that don't use this function (the Axes/Custom one). 我确实尝试了另一个不使用此功能的示例(“ Axes/Custom )。 But now, there's a GD error thrown : 但是现在,出现了GD错误:

FatalErrorException in GraphicsGD.php line 1275: Call to undefined function imageantialias() GraphicsGD.php 1275行中的FatalErrorException:调用未定义的函数imageantialias()

I can comment the imageantialias function lines (1275 and 1301) and then the example works. 我可以注释imageantialias函数行(1275和1301),然后该示例起作用。 For now, it can do the trick but I really want to use the JavaScript asset and it be pleasant to have the anti-aliasing function too. 现在,它可以解决问题,但我真的很想使用JavaScript资产,并且拥有抗锯齿功能也很令人高兴。

Any help is welcome! 欢迎任何帮助! Thanks. 谢谢。

For the first Error, it was my mistake, didn't read through all the documentation for the free/trial version. 对于第一个错误,这是我的错误,没有阅读免费/试用版的所有文档。 JavaScript isn't available for this version. JavaScript不适用于该版本。

For the second one, I recompile PHP following this thread https://help.ubuntu.com/community/CompilingEasyHowTo 对于第二个,我按照此线程https://help.ubuntu.com/community/CompilingEasyHowTo重新编译PHP

The compilation configuration that worked for me was this one : 对我有用的编译配置是这样的:

./configure  --prefix=/usr/
              --with-apxs2=/usr/bin/apxs2
              --with-config-file-path=/etc/php5/apache2
              --disable-ipv6 --enable-inline-optimization
              --disable-debug
              --enable-bcmath
              --enable-calendar
              --with-curl --enable-ctype
              --enable-discard-path
              --enable-exif
              --enable-ftp
              --with-gd
              --with-freetype-dir
              --with-jpeg-dir
              --with-png-dir
              --enable-gd-native-ttf
              --enable-magic-quotes
              --enable-mbstring
              --with-mcrypt --enable-soap --with-pear --with-xsl --with-zlib --with-openssl --enable-sockets --with-mysqli --enable-zip --with-tidy=/usr/ --with-bz2

I'll just have buy the TeeChart to access the JavaScript translator. 我只需要购买TeeChart即可访问JavaScript转换器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM