当前位置: 首页>>代码示例>>PHP>>正文


PHP pData::SetYAxisUnit方法代码示例

本文整理汇总了PHP中pData::SetYAxisUnit方法的典型用法代码示例。如果您正苦于以下问题:PHP pData::SetYAxisUnit方法的具体用法?PHP pData::SetYAxisUnit怎么用?PHP pData::SetYAxisUnit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pData的用法示例。


在下文中一共展示了pData::SetYAxisUnit方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pData

include "../../pChart/pChart/pData.class";
include "../../pChart/pChart/pChart.class";
$array_to_display = $_SESSION['histo_downtime_array'];
//$array_to_display = round($array_to_display);
$name_to_display = $_SESSION['histo_downtime_nom'];
$machine_to_display = $_SESSION['machine_nom'];
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint($array_to_display, "Serie1");
$DataSet->AddPoint(array("Jan", "Fev", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Sept.", "Oct.", "Nov.", "Dec."), "Serie2");
$DataSet->AddAllSeries();
$DataSet->SetAbsciseLabelSerie("Serie2");
$DataSet->SetSerieName("{$machine_to_display}", "Serie1");
$DataSet->SetXAxisName("Mois");
$DataSet->SetYAxisName("Downtime");
$DataSet->SetYAxisUnit(" h");
// Initialise the graph
$Test = new pChart(500, 250);
$Test->setFontProperties("../../pChart/Fonts/tahoma.ttf", 10);
$Test->setGraphArea(70, 30, 480, 200);
$Test->drawFilledRoundedRectangle(7, 7, 493, 243, 5, 240, 240, 240);
$Test->drawRoundedRectangle(5, 5, 495, 225, 5, 230, 230, 230);
$Test->drawGraphArea(255, 255, 255, TRUE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2);
$Test->drawGrid(4, TRUE, 230, 230, 230, 50);
// Draw the 0 line
$Test->setFontProperties("../../pChart/Fonts/tahoma.ttf", 10);
$Test->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
// Draw the line graph
$Test->drawLineGraph($DataSet->GetData(), $DataSet->GetDataDescription());
$Test->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 3, 2, 255, 255, 255);
开发者ID:lynch829,项目名称:iTP,代码行数:31,代码来源:pannes_graph_downtime.php

示例2: pData

include "../../pChart/pChart/pData.class";
include "../../pChart/pChart/pChart.class";
$array_to_display = $_SESSION['histo_tps_pannes_array'];
//$array_to_display = round($array_to_display);
$name_to_display = $_SESSION['histo_tps_pannes_nom'];
$machine_to_display = $_SESSION['machine_nom'];
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint($array_to_display, "Serie1");
$DataSet->AddPoint(array("Jan", "Fev", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Sept.", "Oct.", "Nov.", "Dec."), "Serie2");
$DataSet->AddAllSeries();
$DataSet->SetAbsciseLabelSerie("Serie2");
$DataSet->SetSerieName("{$machine_to_display}", "Serie1");
$DataSet->SetXAxisName("Mois");
$DataSet->SetYAxisName("temps par panne");
$DataSet->SetYAxisUnit(" min");
// Initialise the graph
$Test = new pChart(500, 250);
$Test->setFontProperties("../../pChart/Fonts/tahoma.ttf", 10);
$Test->setGraphArea(85, 30, 480, 200);
$Test->drawFilledRoundedRectangle(7, 7, 493, 243, 5, 240, 240, 240);
$Test->drawRoundedRectangle(5, 5, 495, 225, 5, 230, 230, 230);
$Test->drawGraphArea(255, 255, 255, TRUE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2);
$Test->drawGrid(4, TRUE, 230, 230, 230, 50);
// Draw the 0 line
$Test->setFontProperties("../../pChart/Fonts/tahoma.ttf", 10);
$Test->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
// Draw the line graph
$Test->drawLineGraph($DataSet->GetData(), $DataSet->GetDataDescription());
$Test->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 3, 2, 255, 255, 255);
开发者ID:lynch829,项目名称:iTP,代码行数:31,代码来源:pannes_graph_tps_pannes.php

示例3: pCache

    /**
     * Generates an histogram
     *
     * @param 	array	list of exercise names
     * @param 	array	my results 0 to 100
     * @param 	array	average scores 0-100
     */
    static function generate_session_exercise_graph($names, $my_results, $average)
    {
        require_once api_get_path(LIBRARY_PATH).'pchart/pData.class.php';
        require_once api_get_path(LIBRARY_PATH).'pchart/pChart.class.php';
        require_once api_get_path(LIBRARY_PATH).'pchart/pCache.class.php';

        $cache = new pCache();

        // Dataset definition
        $data_set = new pData();

        // Dataset definition
        $data_set->AddPoint($average,	 "Serie1");
        $data_set->AddPoint($my_results, "Serie2");
        $data_set->AddPoint($names,		 "Serie3");
        $data_set->AddAllSeries();
        $data_set->SetAbsciseLabelSerie('Serie3');
        $data_set->SetSerieName(get_lang('AverageScore'),"Serie1");
        $data_set->SetSerieName(get_lang('MyResults'),	 "Serie2");

        //$data_set->SetYAxisName(get_lang("Percentage"));

        $data_set->SetYAxisUnit("%");

        // Initialise the graph
        $main_width    = 860;
        $main_height   = 500;
        $y_label_angle = 50;
        $data_set->RemoveSerie("Serie3");
        $graph = new pChart($main_width, $main_height);
        //See 3.2 BT#2797
        $graph->setFixedScale(0,100);

        $graph->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',8);
        $graph->setGraphArea(65,50,$main_width-20, $main_height-140);

        $graph->drawFilledRoundedRectangle(7,7,$main_width-7,$main_height-7,5,240,240,240);
        $graph->drawRoundedRectangle(5,5,$main_width-5,$main_height -5,5,230,230,230);
        $graph->drawGraphArea(255,255,255,TRUE);

        //SCALE_NORMAL, SCALE_START0, SCALE_ADDALLSTART0, SCALE_ADDALL
        $graph->drawScale($data_set->GetData(),$data_set->GetDataDescription(),SCALE_NORMAL ,150,150,150,TRUE,$y_label_angle,1, TRUE);
        $graph->drawGrid(4,TRUE,230,230,230,70);

        // Draw the 0 line
        $graph->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',6);
        $graph->drawTreshold(0,143,55,72,TRUE,TRUE);

        // Draw the cubic curve graph
        $graph->drawLineGraph($data_set->GetData(),$data_set->GetDataDescription());
        $graph->drawPlotGraph($data_set->GetData(),$data_set->GetDataDescription(),1,1,230,255,255);

        // Finish the graph
        $graph->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',10);
        $graph->drawLegend($main_width - 150,70,$data_set->GetDataDescription(),255,255,255);

        $graph->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf',11);
        $graph->drawTitle(50, 30, get_lang('ExercisesInTimeProgressChart'), 50,50,50,$main_width-110, true);

        // $main_graph = new pChart($main_width,$main_height);
        $courseCode = isset($_GET['course']) ? Security::remove_XSS($_GET['course']) : null;
        $graph_id = 'generate_session_exercise_graph'.$courseCode.'-'.intval($_GET['session_id']).'-'.api_get_user_id();
        if ($cache->IsInCache($graph_id, $data_set->GetData())) {
        //if (0) {
            //if we already created the img
            //echo 'in cache';
            $img_file = $cache->GetHash($graph_id,$data_set->GetData());
        } else {
            $cache->WriteToCache($graph_id, $data_set->GetData(), $graph);
            ob_start();
            $graph->Stroke();
            ob_end_clean();
            $img_file = $cache->GetHash($graph_id, $data_set->GetData());
        }
        $html = '<img src="'.api_get_path(WEB_ARCHIVE_PATH).$img_file.'">';
        return $html;
    }
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:84,代码来源:tracking.lib.php

示例4: pData

/*
    Example1 : A simple line chart
*/
// Standard inclusions
include "src/pData.php";
include "src/pChart.php";
// Dataset definition
$DataSet = new pData();
$DataSet->ImportFromCSV("Sample/bulkdata.csv", ",", array(1, 2, 3), FALSE, 0);
$DataSet->AddAllSeries();
$DataSet->SetAbsciseLabelSerie();
$DataSet->SetSerieName("January", "Serie1");
$DataSet->SetSerieName("February", "Serie2");
$DataSet->SetSerieName("March", "Serie3");
$DataSet->SetYAxisName("Average age");
$DataSet->SetYAxisUnit("µs");
// Initialise the graph
$Test = new pChart(700, 230);
$Test->setFontProperties("Fonts/tahoma.ttf", 8);
$Test->setGraphArea(70, 30, 680, 200);
$Test->drawFilledRoundedRectangle(7, 7, 693, 223, 5, 240, 240, 240);
$Test->drawRoundedRectangle(5, 5, 695, 225, 5, 230, 230, 230);
$Test->drawGraphArea(255, 255, 255, TRUE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2);
$Test->drawGrid(4, TRUE, 230, 230, 230, 50);
// Draw the 0 line
$Test->setFontProperties("Fonts/tahoma.ttf", 6);
$Test->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
// Draw the line graph
$Test->drawLineGraph($DataSet->GetData(), $DataSet->GetDataDescription());
$Test->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 3, 2, 255, 255, 255);
开发者ID:realityking,项目名称:pchart,代码行数:31,代码来源:Example1.php

示例5: pData

*/
// Standard inclusions
include "src/pData.php";
include "src/pChart.php";
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint(array(9, 9, 9, 10, 10, 11, 12, 14, 16, 17, 18, 18, 19, 19, 18, 15, 12, 10, 9), "Serie1");
$DataSet->AddPoint(array(10, 11, 11, 12, 12, 13, 14, 15, 17, 19, 22, 24, 23, 23, 22, 20, 18, 16, 14), "Serie2");
$DataSet->AddPoint(array(4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22), "Serie3");
$DataSet->AddAllSeries();
$DataSet->RemoveSerie("Serie3");
$DataSet->SetAbsciseLabelSerie("Serie3");
$DataSet->SetSerieName("January", "Serie1");
$DataSet->SetSerieName("February", "Serie2");
$DataSet->SetYAxisName("Temperature");
$DataSet->SetYAxisUnit("∞C");
$DataSet->SetXAxisUnit("h");
// Initialise the graph
$Test = new pChart(700, 230);
$Test->drawGraphAreaGradient(132, 153, 172, 50, TARGET_BACKGROUND);
// Graph area setup
$Test->setFontProperties("Fonts/tahoma.ttf", 8);
$Test->setGraphArea(60, 20, 585, 180);
$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);
$Test->drawGrid(4, TRUE, 230, 230, 230, 20);
// Draw the line chart
$Test->setShadowProperties(3, 3, 0, 0, 0, 30, 4);
$Test->drawLineGraph($DataSet->GetData(), $DataSet->GetDataDescription());
$Test->clearShadow();
开发者ID:realityking,项目名称:pchart,代码行数:31,代码来源:Example21.php

示例6: pData

include "src/pChart.php";
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint(array(1, 2, 5), "Serie1");
$DataSet->AddPoint(array(3, 2, 2), "Serie2");
$DataSet->AddPoint(array(3, 4, 1), "Serie3");
$DataSet->AddPoint(array("A#~1", "A#~2", "A#~3"), "Labels");
$DataSet->AddAllSeries();
$DataSet->RemoveSerie("Labels");
$DataSet->SetAbsciseLabelSerie("Labels");
$DataSet->SetSerieName("Alpha", "Serie1");
$DataSet->SetSerieName("Beta", "Serie2");
$DataSet->SetSerieName("Gama", "Serie3");
$DataSet->SetXAxisName("Samples IDs");
$DataSet->SetYAxisName("Test Marker");
$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);
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:HomePage3.php

示例7: pData

//Close the connection
fclose($handle);
// Include Global Config
include "../conf/graph_conf.php";
// Standard inclusions
include "{$pChart_path}/pData.class";
include "{$pChart_path}/pChart.class";
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint($ydata, "Serie1");
$DataSet->AddPoint($xdata, "Serie3");
$DataSet->AddSerie("Serie1");
$DataSet->SetAbsciseLabelSerie("Serie3");
$DataSet->SetYAxisName("Usage");
$DataSet->SetXAxisName("Hour");
$DataSet->SetYAxisUnit("%");
#$DataSet->SetXAxisFormat("date");
// Initialise the graph
$Test = new pChart(900, 225);
$Test->setColorPalette(0, 126, 185, 245);
$Test->setFontProperties("{$font}", 8);
$Test->setGraphArea(75, 35, 890, 190);
#$Test->drawFilledRoundedRectangle(7,7,450,223,5,240,240,240);
#$Test->drawRoundedRectangle(5,5,450,225,5,230,230,230);
$Test->drawGraphArea(255, 255, 255, FALSE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 75, 75, 75, TRUE, 0, 2);
$Test->drawGrid(1, TRUE, 240, 240, 240);
#$Test->drawGrid(4,TRUE);
// Draw the 0 line
$Test->setFontProperties("{$font}", 6);
$Test->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
开发者ID:jness,项目名称:sarGraphs,代码行数:31,代码来源:cpu_graph.php

示例8: main


//.........这里部分代码省略.........
     $this->autoRender = false;
     //3
     App::import('Vendor', 'pData', array('file' => 'pchart' . DS . 'pData.class'));
     App::import('Vendor', 'pChart', array('file' => 'pchart' . DS . 'pChart.class'));
     //4
     $fontFolder = APP . 'vendors' . DS . 'pchart' . DS . 'Fonts';
     $fontFolder = '..' . DS . '..' . DS . 'vendors' . DS . 'pchart' . DS . 'Fonts';
     //          $SchemaFolder = APP.'vendors'.DS.'pchart'.DS.'schema';
     //5
     // Dataset definition
     $DataSet = new pData();
     $MaxTons = max($report_day);
     $MaxTons = $MaxTons + 100;
     foreach ($report_day as $key => $value) {
         $MyDay[] = (int) $key;
     }
     // 	$this->out(pr($MyDay));
     $DataSet->AddPoint($report_day, "Serie1");
     // 	$DataSet->AddPoint('4',"Serie2");
     // 	$DataSet->AddPoint('20',"Serie3");
     // 	$DataSet->AddPoint($MyDay,"Name");
     // exit();
     //         $this->out(pr($DataSet->GetData()));
     // 	$idx=0;
     //         foreach($MyDay as $key => $value){
     // 	  $DataSet->AddPoint($value,"Serie1");
     // 	  $DataSet->AddPoint((int)$key,"Name");
     //         }
     // 	    $this->out(pr($MyDay));
     //         $DataSet->GetData()['0']['Name']=;
     // 	  $DataSet->GetData()['0']['Name']=1;
     $this->out(pr($DataSet->GetData()));
     $DataSet->AddAllSeries();
     $DataSet->SetAbsciseLabelSerie();
     $key = $value = null;
     $DataSet->SetSerieName("Toneladas", "Serie1");
     $DataSet->SetSerieName("Dia", "Serie2");
     $DataSet->SetYAxisName("Toneladas Dias");
     $DataSet->SetYAxisUnit("Ton");
     $DataSet->SetXAxisName("Dias");
     $DataSet->SetXAxisFormat("number");
     // Initialise the graph
     //          pr($SchemaFolder);
     $Test = new pChart(820, 260);
     $Test->setFixedScale(1, $MaxTons, 5, 0, $NumDays, 5);
     $Test->setDateFormat("H:m");
     $Test->setFontProperties($fontFolder . DS . "tahoma.ttf", 10);
     $Test->setColorPalette(0, 115, 173, 207);
     $Test->setColorPalette(1, 144, 196, 226);
     $Test->setColorPalette(2, 174, 216, 240);
     $Test->setColorPalette(3, 64, 140, 195);
     $Test->setColorPalette(4, 104, 188, 209);
     $Test->setColorPalette(5, 99, 200, 226);
     $Test->setColorPalette(6, 82, 124, 148);
     $Test->setColorPalette(7, 97, 152, 183);
     $Test->setColorPalette(8, 105, 210, 231);
     $Test->setColorPalette(9, 167, 219, 216);
     $Test->setColorPalette(10, 224, 228, 204);
     $Test->setColorPalette(11, 243, 134, 48);
     // 	$Test->loadColorPalette("/tmp/schema/blue.txt",",");
     $Test->setGraphArea(100, 30, 790, 200);
     //       $Test->drawFilledRoundedRectangle(7,7,693,223,5,240,240,240);
     $Test->drawRoundedRectangle(5, 5, 810, 225, 5, 230, 230, 230);
     $Test->drawGraphArea(255, 255, 255, TRUE);
     // 	dibujar la grafica
     $Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2, TRUE);
     $Test->drawGrid(4, TRUE, 230, 230, 230, 50);
     // Draw the line graph
     // Draw the 0 line
     $Test->setFontProperties($fontFolder . DS . "tahoma.ttf", 10);
     $Test->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
     // Draw the bar graph
     $Test->drawBarGraph($DataSet->GetData(), $DataSet->GetDataDescription(), TRUE, 80);
     //  $Test->drawPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription());
     //     $Test->drawXYPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie1","Serie2");
     //     $Test->drawXYPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie1","Serie3");
     //     $Test->drawXYGraph($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie1","Serie2");
     // Finish the graph
     $today = date('Y-m-d');
     // 	$Test->setFontProperties($fontFolder.DS."tahoma.ttf",8);
     //  	$Test->drawLegend(820,150,$DataSet->GetDataDescription(),255,255,255);
     $Test->setFontProperties($fontFolder . DS . "tahoma.ttf", 10);
     if (empty($all) && !empty($KeyArea) && !empty($CurrentMonth)) {
         // CurrentMonth Area
         $Test->drawTitle(220, 22, "Toneladas {$ThisArea[$KeyArea]} {$MyMonth} {$CurrentYear}", 50, 50, 50, 585);
         $Test->Render("../../app/webroot/img/thumbs/graph_" . $today . "_" . $KeyArea . "_" . $Fraccion . ".png");
     }
     if ($all == true && $KeyArea == false && $CurrentMonth == false) {
         // AllYear
         $Test->drawTitle(220, 22, "Toneladas {$CurrentYear}", 50, 50, 50, 585);
         $Test->Render("../../app/webroot/img/thumbs/graph_" . $CurrentYear . "_" . $KeyArea . ".png");
     }
     if ($all == true && $KeyArea > 0 && $CurrentMonth == false) {
         // AllYearArea
         $Test->drawTitle(220, 22, "Toneladas {$ThisArea[$KeyArea]} {$CurrentYear}", 50, 50, 50, 585);
         $Test->Render("../../app/webroot/img/thumbs/graph_" . $CurrentYear . "_" . $KeyArea . ".png");
     }
     // 	$Test->drawTitle(220,22,"Toneladas $MyMonth $CurrentYear",50,50,50,585);
     // 	$Test->Render("../../app/webroot/img/thumbs/graph_".$today."_".$KeyArea."_".$Fraccion.".png");
 }
开发者ID:ambagasdowa,项目名称:projections,代码行数:101,代码来源:report.php

示例9: pChart

}
if ($p6 != '') {
    $DataSet->SetSerieName($n6, "Serie6");
}
if ($p7 != '') {
    $DataSet->SetSerieName($n7, "Serie7");
}
if ($p8 != '') {
    $DataSet->SetSerieName($n8, "Serie8");
}
if ($p9 != '') {
    $DataSet->SetSerieName($n9, "Serie9");
}
//---------------------------- Set X & Y axis units
if ($unit) {
    $DataSet->SetYAxisUnit($unit);
} else {
    $DataSet->SetYAxisUnit("");
}
$DataSet->SetXAxisUnit("");
//---------------------------- Create Object of pChart
$Test = new pChart($w, $h);
//---------------------------- Set generic colors for one (first) channel
if ($_GET['gcolor'] == 'red') {
    $Test->setColorPalette(0, 220, 50, 50);
} elseif ($_GET['gcolor'] == 'brown') {
    $Test->setColorPalette(0, 220, 140, 100);
} elseif ($_GET['gcolor'] == 'blue') {
    $Test->setColorPalette(0, 100, 140, 220);
} elseif ($_GET['gcolor'] == 'green') {
    $Test->setColorPalette(0, 100, 200, 100);
开发者ID:cdkisa,项目名称:majordomo,代码行数:31,代码来源:multia.php

示例10: pData

$Chart->drawGraphAreaGradient(40, 40, 40, -50);
if (count($date) < 2) {
    $Chart->setFontProperties(IMAGE_PATH . '/sig/font/DejaVuSans.ttf', 11);
    $Chart->drawTextBox(100, 90, 180, 110, "Not Enough Session Data", 0, 0, 0, 0, ALIGN_LEFT, FALSE, 255, 255, 255, 0);
} else {
    $DataSet = new pData();
    $DataSet->AddPoint($skill, 'SerieSkill');
    $DataSet->AddPoint($skill_change, 'SerieSession');
    $DataSet->AddPoint($date, 'SerieDate');
    $DataSet->AddSerie('SerieSkill');
    $DataSet->SetAbsciseLabelSerie('SerieDate');
    $DataSet->SetSerieName('Skill', 'SerieSkill');
    $DataSet->SetSerieName('Session', 'SerieSession');
    $Chart->setFontProperties(IMAGE_PATH . '/sig/font/DejaVuSans.ttf', 7);
    $DataSet->SetYAxisName('Skill');
    $DataSet->SetYAxisUnit('K');
    $Chart->setColorPalette(0, 255, 255, 0);
    $Chart->drawRightScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, $color['red'], $color['green'], $color['blue'], TRUE, 0, 0);
    $Chart->drawGrid(1, FALSE, 55, 55, 55, 100);
    $Chart->setShadowProperties(3, 3, 0, 0, 0, 30, 4);
    $Chart->drawCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription());
    $Chart->clearShadow();
    $Chart->drawFilledCubicCurve($DataSet->GetData(), $DataSet->GetDataDescription(), 0.1, 30);
    $Chart->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 1, 1, 255, 255, 255);
    $Chart->clearScale();
    $DataSet->RemoveSerie('SerieSkill');
    $DataSet->AddSerie('SerieSession');
    $DataSet->SetYAxisName('Session');
    $DataSet->SetYAxisUnit('');
    $Chart->setColorPalette(1, 255, 0, 0);
    $Chart->setColorPalette(2, 0, 0, 255);
开发者ID:PitbullOL,项目名称:insurgency-hlstatsx,代码行数:31,代码来源:trend_graph.php

示例11: pData

include "pChart/pData.class";
include "pChart/pChart.class";
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint(1, "Serie1");
$DataSet->AddPoint(3, "Serie2");
$DataSet->AddPoint(3, "Serie3");
$DataSet->AddPoint("A#~1", "Labels");
$DataSet->AddAllSeries();
$DataSet->RemoveSerie("Labels");
$DataSet->SetAbsciseLabelSerie("Labels");
$DataSet->SetSerieName("Alpha", "Serie1");
$DataSet->SetSerieName("Beta", "Serie2");
$DataSet->SetSerieName("Gama", "Serie3");
$DataSet->SetYAxisName("Test Marker");
$DataSet->SetYAxisUnit("�m");
// Initialise the graph
$Test = new pChart(210, 230);
$Test->setFontProperties("Fonts/tahoma.ttf", 8);
$Test->setGraphArea(65, 30, 125, 200);
$Test->drawFilledRoundedRectangle(7, 7, 203, 223, 5, 240, 240, 240);
$Test->drawRoundedRectangle(5, 5, 205, 225, 5, 230, 230, 230);
$Test->drawGraphArea(255, 255, 255, TRUE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_ADDALLSTART0, 150, 150, 150, TRUE, 0, 2, TRUE);
$Test->drawGrid(4, TRUE, 230, 230, 230, 50);
// Draw the 0 line
$Test->setFontProperties("Fonts/tahoma.ttf", 6);
$Test->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
// Draw the bar graph
$Test->drawStackedBarGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 50);
// Finish the graph
开发者ID:sdgdsffdsfff,项目名称:php-test-analyze,代码行数:31,代码来源:SmallStacked.php

示例12: main


//.........这里部分代码省略.........
     $report_day = $kms_senc;
     $report_year = array();
     /** ALERT Save the result for Display in the view
      */
     //2
     $this->autoRender = false;
     //3
     App::import('Vendor', 'pData', array('file' => 'pchart' . DS . 'pData.class'));
     App::import('Vendor', 'pChart', array('file' => 'pchart' . DS . 'pChart.class'));
     //4
     $fontFolder = APP . 'vendors' . DS . 'pchart' . DS . 'Fonts';
     $fontFolder = '..' . DS . '..' . DS . 'vendors' . DS . 'pchart' . DS . 'Fonts';
     //5
     // Dataset definition
     $DataSet = new pData();
     $MaxKms = max($report_day);
     $MaxKms = $MaxKms + 100;
     foreach ($report_day as $key => $value) {
         $MyDay[] = (int) $key;
     }
     // 	$this->out(pr($MyDay));
     $DataSet->AddPoint($report_day, "Serie1");
     // 	$DataSet->AddPoint('4',"Serie2");
     // 	$DataSet->AddPoint('20',"Serie3");
     // 	$DataSet->AddPoint($MyDay,"Name");
     // exit();
     //         $this->out(pr($DataSet->GetData()));
     // 	$idx=0;
     //         foreach($MyDay as $key => $value){
     // 	  $DataSet->AddPoint($value,"Serie1");
     // 	  $DataSet->AddPoint((int)$key,"Name");
     //         }
     // 	    $this->out(pr($MyDay));
     //         $DataSet->GetData()['0']['Name']=;
     // 	  $DataSet->GetData()['0']['Name']=1;
     $this->out(pr($DataSet->GetData()));
     $DataSet->AddAllSeries();
     $DataSet->SetAbsciseLabelSerie();
     $key = $value = null;
     $DataSet->SetSerieName("Kilometros", "Serie1");
     $DataSet->SetSerieName("Dia", "Serie2");
     $DataSet->SetYAxisName("Kilometros Dias");
     $DataSet->SetYAxisUnit("Kms");
     $DataSet->SetXAxisName("Dias");
     $DataSet->SetXAxisFormat("number");
     // Initialise the graph
     //          pr($SchemaFolder);
     $Test = new pChart(820, 260);
     $Test->setFixedScale(1, $MaxKms, 5, 0, $NumDays, 5);
     $Test->setDateFormat("H:m");
     $Test->setFontProperties($fontFolder . DS . "tahoma.ttf", 10);
     // 	$Test->setColorPalette(0,115,173,207);
     // 	$Test->setColorPalette(1,144,196,226);
     $Test->setColorPalette(2, 174, 216, 240);
     $Test->setColorPalette(3, 64, 140, 195);
     $Test->setColorPalette(4, 104, 188, 209);
     $Test->setColorPalette(5, 99, 200, 226);
     $Test->setColorPalette(6, 82, 124, 148);
     $Test->setColorPalette(7, 97, 152, 183);
     $Test->setColorPalette(8, 105, 210, 231);
     $Test->setColorPalette(9, 167, 219, 216);
     $Test->setColorPalette(10, 224, 228, 204);
     $Test->setColorPalette(11, 243, 134, 48);
     // 	$Test->loadColorPalette("/tmp/schema/blue.txt",",");
     $Test->setGraphArea(100, 30, 790, 200);
     //       $Test->drawFilledRoundedRectangle(7,7,693,223,5,240,240,240);
     $Test->drawRoundedRectangle(5, 5, 810, 225, 5, 230, 230, 230);
     $Test->drawGraphArea(255, 255, 255, TRUE);
     // 	dibujar la grafica
     $Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2, TRUE);
     $Test->drawGrid(4, TRUE, 230, 230, 230, 50);
     // Draw the line graph
     // Draw the 0 line
     $Test->setFontProperties($fontFolder . DS . "tahoma.ttf", 10);
     $Test->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
     // Draw the bar graph
     $Test->drawBarGraph($DataSet->GetData(), $DataSet->GetDataDescription(), TRUE, 80);
     //  $Test->drawPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription());
     //     $Test->drawXYPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie1","Serie2");
     //     $Test->drawXYPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie1","Serie3");
     //     $Test->drawXYGraph($DataSet->GetData(),$DataSet->GetDataDescription(),"Serie1","Serie2");
     // Finish the graph
     $today = date('Y-m-d');
     // 	$Test->setFontProperties($fontFolder.DS."tahoma.ttf",8);
     //  	$Test->drawLegend(820,150,$DataSet->GetDataDescription(),255,255,255);
     $Test->setFontProperties($fontFolder . DS . "tahoma.ttf", 10);
     // 	$_today =
     if (isset($KeyArea)) {
         $area = "_" . $KeyArea;
     } else {
         $area = "_0";
     }
     if (isset($Fraccion)) {
         $fraction = "_" . $Fraccion;
     } else {
         $fraction = "_0";
     }
     $Test->drawTitle(220, 22, "Kilometros {$ThisArea[$KeyArea]} {$MyMonth} {$CurrentYear}", 50, 50, 50, 585);
     $Test->Render("../../app/webroot/img/thumbs/graph_kms_" . $today . $area . $fraction . ".png");
 }
开发者ID:ambagasdowa,项目名称:projections,代码行数:101,代码来源:reportkms.php

示例13: build

 public function build()
 {
     require_once PCHART_BASE_DIR . DIRECTORY_SEPARATOR . 'pData.php';
     require_once PCHART_BASE_DIR . DIRECTORY_SEPARATOR . 'pChart.php';
     $dataSet = new pData();
     foreach ($this->lines as $name => $ordinateValues) {
         if (count($ordinateValues) != count($this->absciseValues)) {
             throw new Exception('Count of line "' . $name . '" ordinate points "' . count($ordinateValues) . '" mismatch to abscise points "' . count($this->absciseValues) . '"');
         }
         $dataSet->AddPoint($ordinateValues, $name);
     }
     $dataSet->AddPoint($this->absciseValues, 'Abscise');
     $dataSet->AddAllSeries();
     $dataSet->RemoveSerie('Abscise');
     $dataSet->SetAbsciseLabelSerie('Abscise');
     foreach ($this->lines as $name => $ordinateValues) {
         $dataSet->SetSerieName($name, $name);
     }
     $dataSet->SetYAxisUnit($this->ordinateStepTitle);
     $dataSet->SetXAxisUnit($this->absciseStepTitle);
     $chart = new pChart($this->maxWidth, $this->maxHeight);
     $chart->drawGraphAreaGradient(132, 153, 172, 50, TARGET_BACKGROUND);
     // Graph area setup
     $chart->setFontProperties(PCHART_FONTS_DIR . DIRECTORY_SEPARATOR . 'tahoma.ttf', 10);
     $chart->setGraphArea($this->graphMargins[0], $this->graphMargins[1], $this->maxWidth - $this->graphMargins[2], $this->maxHeight - $this->graphMargins[3]);
     $chart->drawGraphArea(213, 217, 221, FALSE);
     $ordinateScaleMargin = ($this->getMaxOrdinateValue() - $this->getMinOrdinateValue()) / $this->ordinateDevisions;
     $chart->setFixedScale($this->getMinOrdinateValue() - $ordinateScaleMargin, $this->getMaxOrdinateValue() + $ordinateScaleMargin, $this->ordinateDevisions);
     $chart->drawScale($dataSet->GetData(), $dataSet->GetDataDescription(), SCALE_NORMAL, 213, 217, 221, TRUE, 0, 2);
     $chart->drawGraphAreaGradient(162, 183, 202, 50);
     $chart->drawGrid(4, TRUE, 230, 230, 230, 20);
     // Draw the line chart
     //		$chart->setShadowProperties(1, 1, 0, 0, 0, 30, 4);
     $chart->drawLineGraph($dataSet->GetData(), $dataSet->GetDataDescription());
     $chart->clearShadow();
     $chart->drawPlotGraph($dataSet->GetData(), $dataSet->GetDataDescription(), 5, 3, -1, -1, -1, TRUE);
     // Draw the legend
     $chart->drawLegend($this->maxWidth - $this->graphMargins[2] + 10, $this->graphMargins[1], $dataSet->GetDataDescription(), 236, 238, 240, 52, 58, 82);
     // Draw chart title
     if ($this->chartTitle) {
         $chart->drawTextBox(0, $this->maxHeight - 20, $this->maxWidth, $this->maxHeight, $this->chartTitle, 0, 255, 255, 255, ALIGN_RIGHT, TRUE, 0, 0, 0, 30);
     }
     // Render the picture
     $chart->addBorder(2);
     $chart->Render($this->outputFilepath);
 }
开发者ID:ATouhou,项目名称:dbench,代码行数:46,代码来源:Chart.php

示例14: pData

*/
// Standard inclusions
include "pChart/pData.class";
include "pChart/pChart.class";
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint(array(60, 70, 90, 110, 100, 90), "Serie1");
$DataSet->AddPoint(array(40, 50, 60, 80, 70, 60), "Serie2");
$DataSet->AddPoint(array("Jan", "Feb", "Mar", "Apr", "May", "Jun"), "Serie3");
$DataSet->AddSerie("Serie1");
$DataSet->AddSerie("Serie2");
$DataSet->SetAbsciseLabelSerie("Serie3");
$DataSet->SetSerieName("Company A", "Serie1");
$DataSet->SetSerieName("Company B", "Serie2");
$DataSet->SetYAxisName("Product sales");
$DataSet->SetYAxisUnit("k");
$DataSet->SetSerieSymbol("Serie1", "Sample/Point_Asterisk.gif");
$DataSet->SetSerieSymbol("Serie2", "Sample/Point_Cd.gif");
// Initialise the graph
$Test = new pChart(700, 230);
$Test->setFontProperties("Fonts/tahoma.ttf", 8);
$Test->setGraphArea(65, 30, 650, 200);
$Test->drawFilledRoundedRectangle(7, 7, 693, 223, 5, 240, 240, 240);
$Test->drawRoundedRectangle(5, 5, 695, 225, 5, 230, 230, 230);
$Test->drawGraphArea(255, 255, 255, TRUE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2, TRUE);
$Test->drawGrid(4, TRUE, 230, 230, 230, 50);
// Draw the title
$Test->setFontProperties("Fonts/pf_arma_five.ttf", 6);
$Title = "Comparative product sales for company A & B  ";
$Test->drawTextBox(65, 30, 650, 45, $Title, 0, 255, 255, 255, ALIGN_RIGHT, TRUE, 0, 0, 0, 30);
开发者ID:shojibflamon,项目名称:Bar-Code-example,代码行数:31,代码来源:Example22.php

示例15: pData

<?php

// Standard inclusions
include "pChart/pData.class";
include "pChart/pChart.class";
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint(array(1079, 1151, 1185, 1226, 1121, 738, 710), "Visitor");
$DataSet->AddPoint(array("1 พ.ย.", "2 พ.ย.", "3 พ.ย.", "4 พ.ย.", "5 พ.ย.", "6 พ.ย.", "7 พ.ย."), "Day");
$DataSet->AddSerie("Visitor");
$DataSet->SetAbsciseLabelSerie("Day");
$DataSet->SetYAxisName("Visitors");
$DataSet->SetYAxisUnit("ip");
// Initialise the graph
$Graph = new pChart(700, 230);
$Graph->setFontProperties("Fonts/tahoma.ttf", 8);
$Graph->setGraphArea(70, 30, 680, 200);
$Graph->drawFilledRoundedRectangle(7, 7, 693, 223, 5, 240, 240, 240);
$Graph->drawRoundedRectangle(5, 5, 695, 225, 5, 230, 230, 230);
$Graph->drawGraphArea(255, 255, 255, TRUE);
$Graph->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 150, 150, 150, TRUE, 0, 2);
$Graph->drawGrid(4, TRUE, 230, 230, 230, 50);
// Draw the 0 line
$Graph->setFontProperties("Fonts/tahoma.ttf", 6);
$Graph->drawTreshold(0, 143, 55, 72, TRUE, TRUE);
// Draw the line graph
$Graph->drawLineGraph($DataSet->GetData(), $DataSet->GetDataDescription());
$Graph->drawPlotGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 3, 2, 255, 255, 255);
// Finish the graph
$Graph->setFontProperties("Fonts/tahoma.ttf", 8);
$Graph->drawLegend(75, 35, $DataSet->GetDataDescription(), 255, 255, 255);
开发者ID:shojibflamon,项目名称:Bar-Code-example,代码行数:31,代码来源:2TestByMod.php


注:本文中的pData::SetYAxisUnit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。