Ejemplo n.º 1
0
 $yTickWidth = strlen($yTickWidth) * 7;
 $widthWeek = 70 * $contributionStat['nbCols'] + 100 + $legendWidth;
 $widthTotal = 70 + 100 + $legendWidth + $yTickWidth;
 $height = 250;
 $widthUser = 70 * $userContributions['nbCols'] + 100 + $legendWidth + $yTickWidth;
 $widthGroup = 70 * count($groupContributions) + 100 + $legendWidth + $yTickWidth;
 $space = 20;
 if ($prefs['feature_jpgraph'] == 'y') {
     require_once 'lib/jpgraph/src/jpgraph.php';
     require_once 'lib/jpgraph/src/jpgraph_bar.php';
     require_once 'lib/jpgraph/src/jpgraph_mgraph.php';
     $imagegallib = TikiLib::lib('imagegal');
     $ext = 'jpeg';
     $background = new MGraph();
     $background->SetImgFormat($ext);
     $background->SetFrame(true, 'black');
     $background->SetMargin(10, 10, 10, 10);
 } else {
     require_once 'lib/sheet/grid.php';
     require_once 'lib/graph-engine/gd.php';
     require_once 'lib/graph-engine/pdflib.php';
     require_once 'lib/graph-engine/ps.php';
     require_once 'lib/graph-engine/graph.pie.php';
     require_once 'lib/graph-engine/graph.bar.php';
     require_once 'lib/graph-engine/graph.multiline.php';
     $graphType = 'BarStackGraphic';
     $ext = 'jpg';
     $background = new GD_GRenderer(max($widthUser, $widthWeek), 8 * $height, $ext);
     $legendWidth = 300;
 }
 include_once 'lib/smarty_tiki/modifier.tiki_short_date.php';
Ejemplo n.º 2
0
    $bplot4 = new BarPlot($y4);
    // Adjust fill color
    $bplot4->SetFillColor('purple1');
    $graph4->Add($bplot4);
    // Setup the titles
    $descibe4 = iconv('UTF-8', 'ASCII//TRANSLIT', tr("octeam_stat_m_caches"));
    $graph4->title->Set($descibe4);
    $graph4->xaxis->title->Set(iconv('UTF-8', 'ASCII//TRANSLIT', tr('number_month')) . '2014/2015');
    $graph4->xaxis->SetTickLabels($x4);
    $graph4->yaxis->title->Set($ncaches);
    $graph4->title->SetFont(FF_FONT1, FS_BOLD);
    $graph4->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
    $graph4->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
    // Setup the values that are displayed on top of each bar
    $bplot4->value->Show();
    // Must use TTF fonts if we want text at an arbitrary angle
    $bplot4->value->SetFont(FF_FONT1, FS_BOLD);
    $bplot4->value->SetAngle(0);
    $bplot4->value->SetFormat('%d');
    //-----------------------
    // Create a multigraph
    //----------------------
    $mgraph = new MGraph();
    $mgraph->SetMargin(10, 10, 10, 10);
    $mgraph->SetFrame(true, 'darkgray', 2);
    $mgraph->Add($graph);
    $mgraph->Add($graph3, 0, 220);
    $mgraph->Add($graph2, 0, 440);
    $mgraph->Add($graph4, 0, 660);
    $mgraph->Stroke();
}
Ejemplo n.º 3
0
 require_once "jpgraph/src/jpgraph_date.php";
 require_once 'jpgraph/src/jpgraph_mgraph.php';
 // etablit la liste des instruments par frequences decroissantes
 foreach ($rs['OBSERVAT'] as $key => $val) {
     $data[] = array('observatory' => $val . '/' . $rs['INSTRUME'][$key] . '/' . $rs['TELESCOP'][$key], 'wavemax' => $rs[$key]);
     $telescops[] = $rs['OBSERVAT'][$key] . '/' . $rs['INSTRUME'][$key] . '/' . $rs['TELESCOP'][$key];
 }
 /*$telescops = $rs['OBSERVAT'];*/
 $wavemax = $rs['WAVEMAX'];
 array_multisort($wavemax, SORT_DESC, $telescops, SORT_ASC, $data);
 $instrume = array_values(array_unique($telescops));
 $tmp = explode(" ", $date);
 $timestamp_date = strtotime($tmp[0]);
 $mgraph = new MGraph();
 $mgraph->title->Set("HELIO features catalog/Paris Observatory    " . $tmp[0]);
 $mgraph->SetFrame(true);
 //$mgraph->SetBackgroundImagePos(1, 1);
 $graph = array();
 //$numgraph = 0;
 for ($i = 0; $i < count($instrume); $i++) {
     // retourne tous les rangs pour l'instrument courant
     $keys = array();
     foreach ($rs['OBSERVAT'] as $key => $val) {
         if (!strcmp($instrume[$i], $val . '/' . $rs['INSTRUME'][$key] . '/' . $rs['TELESCOP'][$key])) {
             $keys[] = $key;
         }
     }
     if ($with_obs) {
         $fits_path = 'ftp://ftpbass2000.obspm.fr/pub/helio/t2/';
         $filename = $rs['FEAT_FILENAME'][$keys[0]];
         $trans1 = array("_200_par.csv" => ".fits");