Example #1
0
$DataSet->SetYAxisUnit("┬Ám");
// Initialise the graph
$Test = new pChart(380, 400);
$Test->drawGraphAreaGradient(90, 90, 90, 90, TARGET_BACKGROUND);
// Graph area setup
$Test->setFontProperties("Fonts/pf_arma_five.ttf", 6);
$Test->setGraphArea(110, 180, 350, 360);
$Test->drawGraphArea(213, 217, 221, FALSE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_ADDALLSTART0, 213, 217, 221, TRUE, 0, 2, TRUE);
$Test->drawGraphAreaGradient(40, 40, 40, -50);
$Test->drawGrid(4, TRUE, 230, 230, 230, 5);
// Draw the title
$Test->setFontProperties("Fonts/tahoma.ttf", 10);
$Title = "  Average growth size for selected\r\n  DNA samples  ";
$Test->setLineStyle(2);
$Test->drawLine(51, -2, 51, 402, 0, 0, 0);
$Test->setLineStyle(1);
$Test->drawTextBox(0, 0, 50, 400, $Title, 90, 255, 255, 255, ALIGN_BOTTOM_CENTER, TRUE, 0, 0, 0, 30);
$Test->setFontProperties("Fonts/pf_arma_five.ttf", 6);
// Draw the bar graph
$Test->drawStackedBarGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 70);
// Second chart
$DataSet->SetXAxisName("");
$Test->clearScale();
$Test->setGraphArea(110, 20, 350, 140);
$Test->drawGraphArea(213, 217, 221, FALSE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_START0, 213, 217, 221, TRUE, 0, 2);
$Test->drawGraphAreaGradient(40, 40, 40, -50);
$Test->drawGrid(4, TRUE, 230, 230, 230, 5);
// Draw the line chart
$Test->setShadowProperties(0, 3, 0, 0, 0, 30, 4);
Example #2
0
    $hei = 50;
    // light/black
    if ($black == 1) {
        $cbg = 0;
    } else {
        $cbg = 255;
    }
    // Object + GraphArea
    $Test = new pChart($wid, $hei);
    $Test->setGraphArea(0, 0, $wid, $hei);
    // Background
    $Test->drawBackground($cbg, $cbg, $cbg);
    // Draw body
    $Test->drawFilledRoundedRectangle(0, 0, 50, 50, 8, $caR, $caG, $caB);
    // body
    $Test->drawLine(6, 30, 44, 30, 220, 220, 220, FALSE);
    // line
    // Draw value
    $Test->setFontProperties("./pChart/Fonts/tahoma.ttf", 12);
    $Test->drawTextBox(8, 10, 45, 23, "{$currentValue}" . "{$unit}", 0, 250, 250, 250, ALIGN_CENTER, FALSE, -1, -1, -1, 100);
    // Draw label
    $Test->setFontProperties("./pChart/Fonts/tahoma.ttf", 8);
    $Test->drawTextBox(8, 32, 42, 46, "{$label}", 0, 250, 250, 250, ALIGN_CENTER, FALSE, -1, -1, -1, 100);
    // end of sticker1c
    //---------------------------- cloud
} elseif ($objtype == "cloud") {
    // Settings
    $wid = 50;
    $hei = 50;
    // light/black
    if ($black == 1) {
Example #3
0
 function drawLine($X1, $Y1, $X2, $Y2, $R, $G, $B, $GraphFunction = FALSE)
 {
     if (!$this->aliasedGraph) {
         imageline($this->Picture, $X1, $Y1, $X2, $Y2, imagecolorallocate($this->Picture, $R, $G, $B));
         return;
     }
     parent::drawLine($X1, $Y1, $X2, $Y2, $R, $G, $B, $GraphFunction);
 }
Example #4
0
        $caB = 210 - $k;
    } else {
        $caR = 200;
        $caG = 100;
        $caB = 100;
    }
    // Draw
    $Test->drawFilledRectangle($bodyXmin, $bodyYmin, $bodyXmax, $metrYmax, $caR, $caG, $caB);
    $Test->drawFilledCircle($metrCenter + 5, $bodyYmin - 10, 13, $caR, $caG, $caB, 0);
    $Test->drawFilledCircle($metrCenter + 5, $bodyYmin - 10, 9, $cbody, $cbody, $cbody, 0);
    $Test->drawFilledEllipse($metrCenter - 4, $bodyYmin, 16, 30, $caR, $caG, $caB);
    $Test->drawLine($bodyXmin + 4, 35, $bodyXmax - 4, 35, $cbody, $cbody, $cbody, FALSE);
    $Test->drawLine($bodyXmin + 4, 36, $bodyXmax - 4, 36, $cbody, $cbody, $cbody, FALSE);
    $Test->drawLine($bodyXmin - 2, 60, $bodyXmax + 2, 60, $cbody, $cbody, $cbody, FALSE);
    $Test->drawLine($bodyXmin - 2, 61, $bodyXmax + 2, 61, $cbody, $cbody, $cbody, FALSE);
    $Test->drawLine($bodyXmin - 5, 37, $bodyXmax - 4, 37, $caR, $caG, $caB, FALSE);
    $Test->drawLine($bodyXmin - 4, 38, $bodyXmax - 4, 38, $caR, $caG, $caB, FALSE);
    $Test->drawLine($bodyXmin - 3, 39, $bodyXmax - 4, 39, $caR, $caG, $caB, FALSE);
    $Test->drawLine($bodyXmin - 2, 40, $bodyXmax - 4, 40, $caR, $caG, $caB, FALSE);
    $Test->drawLine($bodyXmin - 1, 41, $bodyXmax - 4, 41, $caR, $caG, $caB, FALSE);
    // end of kettle1
    //-------------------------------------------------------- svet1
} elseif ($objtype == "svet1") {
    // Settings
    $wid = 90;
    $hei = 20;
    // light/black
    if ($black == 1) {
        $cbg = $blackc;
    } else {
        $cbg = 255;