Bonjour
je ne trouve pas ce qui cloche dans mon prog que voici, rien ne sort:
Dans mon fichier php j'arrive à un moment ou je génére l'image:
et voici ma fonction qui créé mon image:
Code : Sélectionner tout - Visualiser dans une fenêtre à part $imgSRC = createCourbejpgraph($aChampLib,$aValueChamp,$strTitre,$aLibIndic,$strImgSource,$strImg);
ca mouline mais ne sort rien..
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 function createCourbejpgraph($datax,$aDataTodraw,$strTitreGraph,$aLegend,$strFileOut,$strImg){ require_once ('../jpgraph/jpgraph.php'); require_once ('../jpgraph/jpgraph_line.php'); require_once ('../jpgraph/jpgraph_error.php'); $datay = $aDataTodraw; $graph = new Graph(300,200); $graph->img->SetMargin(40,40,40,40); $graph->img->SetAntiAliasing(); $graph->SetScale("textlin"); $graph->SetShadow(); $graph->title->Set($strTitreGraph); $graph->title->SetFont(FF_FONT1,FS_BOLD); // Use 20% "grace" to get slightly larger scale then min/max of // data $graph->yscale->SetGrace(20); $p1 = new LinePlot($datay); $p1->mark->SetType(MARK_FILLEDCIRCLE); $p1->mark->SetFillColor("red"); $p1->mark->SetWidth(4); $p1->SetColor("blue"); $p1->SetCenter(); $graph->Add($p1); //$graph->Stroke($strImg); $graph->Stroke($strFileOut); return $strFileOut ; }
Je précise que le programme php à la base appelait un autre fonction qui générait l'image. Cela fonctionnait mais la biblio était vieille. Donc pour un rendu meilleur j'ai voulu installer jpgraph.
J'ai donc changé le nom de la fonction pour appeler la nouvelle (createcourbejpgraph).
Est ce que ca ne pourrait pas venir du fait que je n'appelle pas un fichier.php qui ne contiendrait que la fonction (comme dans les exemples en somme)?
Merci pour votre aide
Partager