Bonjour,

J'ai regardé une bonne partie des exemples fournis avec la lib.
Elle a l'air vraiment très puissante.

Par contre je bloque déjà:
j'essaie d'intégrer un graph dans une page qui contiendrait autre chose que celui-ci. Je procède ainsi (Basé sur Exemple0.php, a priori le plus accessible) :

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
<?php
    include ("jpgraph/jpgraph.php");
    include ("jpgraph/jpgraph_line.php");
?>
 
<html>
 
<head>
<title>test</title>
 
<link rel="stylesheet" type="text/css" href="CSS/SuiviProjets.css">
 
</head>
 
<body>
<?php
    // Some data
    $ydata = array(11,3,8,12,5,1,9,13,5,7);
 
    // Create the graph. These two calls are always required
    $graph = new Graph(350,250,"auto"); 
    $graph->SetScale("textlin");
 
    // Create the linear plot
    $lineplot=new LinePlot($ydata);
    $lineplot->SetColor("blue");
 
    // Add the plot to the graph
    $graph->Add($lineplot);
 
    // Display the graph
    $graph->Stroke();
?>
</body>
</html>
J'obtiens une suite de caractères incompréhensibles.

J'ai également testé:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
<img src="<?php
    header("Content-type: image/png");
    // Some data
    $ydata = array(11,3,8,12,5,1,9,13,5,7);
 
    ...
 
    // Display the graph
    $graph->Stroke();
?>">
Mais le résultat est à peu près le même...

Quelqu'un aurait-il une piste svp ?

Merci