コード例 #1
0
    function printAll()
    {
        ImagePNG($this->IMAGE);
        ImageDestroy($this->IMAGE);
    }
    //————–调试
    function debug()
    {
        echo "X:" . $this->X . "\r\nY:" . $this->Y;
        echo "\r\nBORDER:" . $this->BORDER;
        $item_array = split($this->ARRAYSPLIT, $this->ITEMARRAY);
        $num = Count($item_array);
        echo "\r\n数值个数:" . $num . "\r\n数值:";
        for ($i = 0; $i < $num; $i++) {
            echo "\r\n" . $item_array[$i];
        }
    }
}
//$report->debug();//调式之用
Header("Content-type:image/png");
$report = new ImageReport();
$report->setImage(330, 140, 255, 255, 255, 1);
//参数(长,高,背影色R,G,B,是否透明1或0)
$temparray = "0,260,400,124,48,720,122,440,475";
//数值,用指定符号隔开
$report->setItem(',', $temparray, 1, 23);
//参数(分隔数值的指定符号,数值变量,样式1为竖柱图2为横柱图3为折线图4为饼图,距离)
$report->setFont(1);
//字体大小1-10
//$report->setX(1,1);//设置X轴刻度值(起始刻度值=1,刻度间隔值=1)
$report->PrintReport();