IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques et frameworks PHP Discussion :

[JpGraph] Problème d'affichage d'erreurs


Sujet :

Bibliothèques et frameworks PHP

  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    36
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2005
    Messages : 36
    Par défaut [JpGraph] Problème d'affichage d'erreurs
    Bonjour,

    Je construit un graph à partir d'un id (plus eventuellement un idMoteur)

    Lorsque je n'utilise que l'id le graph s'affiche sinon il m'indique que l'image ne peut etre affichée car elle contient des erreurs.
    Pourtant mon code semble correcte :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    $sql = "select * from PACK where ID_PACK = " . intval($_GET['id']);
    $filtre = "ID_PACK = " . intval($_GET['id']);
    $rs = mssql_query($sql) or die(erreurSQL($sql));
    if ($row = @mssql_fetch_array($rs)) {
    	check_contrat($row['ID_CONTRAT']); //compatibilité avec le FR
     
    	$sql = "select * from PACKPOSITIONNEMENT where $filtre and POS_VISIBLE=1 and POS_VALIDE=1 order by POS_DATE";
    	$rsListe = mssql_query($sql) or die(erreurSQL($sql)); 
    	$aTop1 = $aTop10 = $aTop20 = $aLabel = array();
    	$POS_NBREQUETE = 0;
    	while($rowListe = @mssql_fetch_array($rsListe)) {
    		$aTop1[] = $rowListe['POS_NBTOP1'];
    		$aTop10[] = $rowListe['POS_NBTOP10'];
    		$aTop20[] = $rowListe['POS_NBTOP20'];
    		$aLabel[] = strftime("%B %Y ", $rowListe['POS_DATE']);
    		if ($POS_NBREQUETE < $rowListe['POS_NBREQUETE']) $POS_NBREQUETE = $rowListe['POS_NBREQUETE'];
    	}
     
    	$graph = new Graph(760, 400, 'auto');	
    	$graph->SetScale("textlin", 0, $POS_NBREQUETE);
    	$graph->img->SetMargin(50,10,30,120);
    	$graph->SetMarginColor('white');
     
    	$graph->xaxis->SetTickLabels($aLabel);
    	$graph->xaxis->SetLabelAngle(90);
     
    	$graph->legend->SetPos(0.5, 0.01, "center", "top");	
    	$graph->legend->SetLayout(LEGEND_HOR);
    	$graph->legend->SetShadow(false); 
     
    	$lineplot3 = new LinePlot($aTop20);
    	$lineplot3->SetColor(array(233, 131, 116));
    	$lineplot3->SetFillColor(array(233, 131, 116));
      $lineplot3->SetStyle(1); 
    	$lineplot3->SetWeight(2);
    	$lineplot3->SetLegend("Top 20");
    	$graph->Add($lineplot3);
     
    	$lineplot2 = new LinePlot($aTop10);
    	$lineplot2->SetColor(array(255, 255, 128));
    	$lineplot2->SetFillColor(array(255, 255, 128));
      $lineplot2->SetStyle(1); 
    	$lineplot2->SetWeight(2);
    	$lineplot2->SetLegend("Top 10");
    	$graph->Add($lineplot2);
     
    	$lineplot = new LinePlot($aTop1);
    	$lineplot->SetColor(array(150, 205, 143));
    	$lineplot->SetFillColor(array(150, 205, 146));
      $lineplot->SetStyle(1); 
    	$lineplot->SetWeight(2);
    	$lineplot->SetLegend("Top 1");
    	$graph->Add($lineplot);
     
      if (isset($_GET['idConcurrent'])){
        $sql = "select * from PACKPOSITIONNEMENT where ID_PACKCONCURRENT = " . intval($_GET['idConcurrent']) . " 
                and POS_VISIBLE=1 and POS_VALIDE=1 order by POS_DATE";print_r($sql);
        $rsListe = mssql_query($sql) or die(erreurSQL($sql)); 
      	$aTop1 = $aTop10 = $aTop20 = array();
      	while($rowListe = @mssql_fetch_array($rsListe)) {
      		$aTop1[] = $rowListe['POS_NBTOP1'];
      		$aTop10[] = $rowListe['POS_NBTOP10'];
      		$aTop20[] = $rowListe['POS_NBTOP20'];
      	}
     
      	$lineplot6 = new LinePlot($aTop20);
      	$lineplot6->SetColor("black");
      	$lineplot6->SetStyle(3); 
      	$lineplot6->SetWeight(2);
      	$graph->Add($lineplot6);
     
      	$lineplot5 = new LinePlot($aTop10);
      	$lineplot6->SetColor("black@0.5");
      	$lineplot5->SetStyle(3); 
      	$lineplot5->SetWeight(2);
      	$graph->Add($lineplot5);
     
      	$lineplot4 = new LinePlot($aTop1);
      	$lineplot6->SetColor("black@0.9");
      	$lineplot4->SetStyle(3); 
      	$lineplot4->SetWeight(2);
      	$graph->Add($lineplot4);  
      }
     
    	$graph->Stroke();
    }
    voyez vous mon erreur? ou pouvez vous m'indiquer si je peux débugger en affichant une erreur plus précise parce que je suis un peu dans le flou

    MERCI

  2. #2
    Membre averti
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    36
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2005
    Messages : 36
    Par défaut
    J'ai trouvé mon erreur..
    C'était uniquement un oubli de suppression de 'print_r()'

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [JpGraph] JPGraphe:Probléme d'affichage de graphe et export pdf
    Par farhaenis dans le forum Bibliothèques et frameworks
    Réponses: 0
    Dernier message: 06/07/2011, 11h44
  2. Problème d'affichage d'erreur dans modalpanel
    Par fab76000 dans le forum JSF
    Réponses: 5
    Dernier message: 16/06/2009, 17h26
  3. [JpGraph] Problème d'affichage de courbes
    Par brindherbe86 dans le forum Bibliothèques et frameworks
    Réponses: 3
    Dernier message: 07/05/2008, 18h35
  4. [JpGraph] Problème d'affichage dans Firefox
    Par Eric_M_78 dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 18/01/2008, 16h21
  5. Problème d'affichage d'erreur avec un spool
    Par hokidoki dans le forum SQL
    Réponses: 0
    Dernier message: 13/11/2007, 11h49

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo