在页面上嵌入图表?
如何在我的HTML页面上的特定位置获得
pchart
?现在,当我按照例子使用时
$myPicture->autoOutput();
它只是覆盖了我的整个页面,只显示了图表。
看着pChart
源我在pImage.class.php
里找到了一个相关的功能
function stroke()
{
if ( $this->TransparentBackground ) { imagealphablending($this->Picture,false); imagesavealpha($this->Picture,true); }
header('Content-type: image/png');
imagepng($this->Picture);
}
我试图将其更改为此但它似乎返回null并且我得到了一堆错误
警告:imagettfbbox()[function.imagettfbbox]:**中的字体文件名无效
function stroke()
{
ob_start(NULL,4096);
$this->Picture;
header('Content-type: text/html');
return base64_encode(ob_get_clean();
}
没有找到相关结果
已邀请:
2 个回复
蓟类
。 HtH,Thor
烫珊
然后使用pChart lib的PHP代码调用这样的函数:
通过这种方式,我可以在客户端使用jQuery轻松调用Ajax调用,而无需在服务器中创建图像文件,如上面提到的帖子中所述。