PHP:ez组件图表不显示

时间:2014-09-03 10:13:41

标签: php codeigniter svg mozilla

我使用ez Components绘制一个简单的饼图。为了测试它,我只是从他们的教程中复制粘贴代码来显示图表,但只显示一个空白屏幕。

这是一个与SVG渲染有关的问题吗?或者是否有与ez Components相关的设置/配置?我正在使用Mozilla btw。

代码:

    <?php

require_once( APPPATH . 'libraries\ezcomponents-2009.2.1\Graph\docs\tutorial\tutorial_autoload.php' );

    class abc extends CI_Controller {


    public function __construct() {
        parent::__construct();
         $this->load->model('abc_model', 'abcModel');
    }

    function index($a="", $b="", $c="", $d="")
    {

    //
    //...some code later
    //...

    // Create a new pie chart
       $chart = new ezcGraphPieChart();

       //echo ('Test');

    $graph = new ezcGraphPieChart();
    $graph->title = 'Access statistics';
    $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
    'Mozilla' => 19113,
    'Explorer' => 10917,
    'Opera' => 1464,
    'Safari' => 652,
    'Konqueror' => 474,
    ) );
    $graph->data['Access statistics']->highlight['Mozilla'] = true;
    $graph->render( 400, 150, 'tutorial_simple_pie.svg' ); 



  }

//..some code later
//..

}

以后编辑:

这是来自XAMPP的错误日志,如果它有帮助:

[Wed Sep 03 15:59:37.046875 2014] [core:warn] [pid 4816:tid 168] AH00098:pid文件D:/xampp/apache/logs/httpd.pid被覆盖 - 以前Apache的不正常关闭运行

[Wed Sep 03 15:59:37.156250 2014] [ssl:warn] [pid 4816:tid 168] AH01873:初始化:未配置会话缓存[提示:SSLSessionCache]

[Wed Sep 03 15:59:37.640625 2014] [mpm_winnt:notice] [pid 4816:tid 168] AH00455:Apache / 2.4.3(Win32)OpenSSL / 1.0.1c配置PHP / 5.4.7 - 恢复正常运作

[Wed Wed 03 15:59:37.640625 2014] [mpm_winnt:notice] [pid 4816:tid 168] AH00456:服务器内置:2012年8月18日12:41:37

[Wed Sep 03 15:59:37.640625 2014] [core:notice] [pid 4816:tid 168] AH00094:命令行:&#39; d:\ xampp \ apache \ bin \ httpd.exe -d D :/ XAMPP /阿帕奇&#39;

[Wed Wed 03 15:59:37.640625 2014] [mpm_winnt:notice] [pid 4816:tid 168] AH00418:家长:创建的子流程6072

[Wed Sep 03 15:59:38.812500 2014] [ssl:warn] [pid 6072:tid 1884] AH01873:初始化:未配置会话缓存[提示:SSLSessionCache]

[Wed Wed 03 15:59:38.906250 2014] [mpm_winnt:notice] [pid 6072:tid 1884] AH00354:Child:开始150个工作线程。

0 个答案:

没有答案