Esempio n. 1
0
        if ($p7 != '' && $n7 != "") {
            $Test->setLabel($DataSet->GetData(), $DataSet->GetDataDescription(), "Serie7", $r, $n7, 221, 230, 174);
        }
        if ($p8 != '' && $n8 != "") {
            $Test->setLabel($DataSet->GetData(), $DataSet->GetDataDescription(), "Serie8", $r, $n8, 221, 230, 174);
        }
        if ($p9 != '' && $n9 != "") {
            $Test->setLabel($DataSet->GetData(), $DataSet->GetDataDescription(), "Serie9", $r, $n9, 221, 230, 174);
        }
    } else {
        if ($n0 != "") {
            $Test->setLabel($DataSet->GetData(), $DataSet->GetDataDescription(), "Serie2", $r, $n0, 221, 230, 174);
        }
    }
}
//---------------------------- Legend
if ($legend) {
    $Test->setFontProperties("./pChart/Fonts/tahoma.ttf", 9);
    $Test->drawLegend($legx, $legy, $DataSet->GetDataDescription(), 240, 240, 240, -1, -1, -1, 90, 90, 90, TRUE);
}
//---------------------------- Border
if ($_GET['border'] == '1') {
    $Test->AddBorder(1, 200, 200, 200);
}
//---------------------------- Image PNG
Header("Content-type:image/png");
imagepng($Test->Picture);
//$Test->Render();
//---------------------------- Disconnect
$db->Disconnect();
// closing database connection
Esempio n. 2
0
if (!$width) {
    $w = 610;
} else {
    $w = (int) $width;
}
if (!$height) {
    $h = 210;
} else {
    $h = (int) $height;
}
$Test = new pChart($w, $h);
$Test->setColorPalette(0, 255, 255, 255);
$Test->drawGraphAreaGradient(132, 153, 172, 50, TARGET_BACKGROUND);
$Test->setFontProperties("./pChart/Fonts/tahoma.ttf", 8);
$Test->setGraphArea(60, 20, $w - 25, $h - 30);
$Test->drawGraphArea(213, 217, 221, FALSE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 213, 217, 221, TRUE, 0, 2);
$Test->drawGraphAreaGradient(162, 183, 202, 50);
if (count($values) <= 30) {
    $Test->drawGrid(4, TRUE, 230, 230, 230, 20);
}
// Draw the line chart
$Test->drawLineGraph($DataSet->GetData(), $DataSet->GetDataDescription());
//$Test->drawPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),2);
// Render the picture
$Test->AddBorder(1);
Header("Content-type:image/png");
imagepng($Test->Picture);
//$Test->Render();
$db->Disconnect();
// closing database connection