Bonjour a tous,

J'essaie d'afficher un graph et cela ne marche pas...pourant mon code me semble correct.
le voici et plus bas l'erreur qui s'affiche.

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
// Data must be in the format : open,close,min,max,median
$datay = array(2,2,4,5,5);
 
// Setup a simple graph
$graph = new Graph(300,200);
$graph->SetScale("textlin");
$graph->SetMargin(60,60,50,30);
$graph->title->Set($titre);
 
// Create a new stock plot
$p1 = new BoxPlot($datay);
 
// Width of the bars (in pixels)
$p1->SetWidth(9);
 
// Uncomment the following line to hide the horizontal end lines
//$p1->HideEndLines();
 
// Add the plot to the graph and send it back to the browser
$graph->Add($p1);
$graph->Stroke();
 
	$graph->Add($p1);
	$graph->img->SetImgFormat('png');
	$graph->img->SetQuality(50);
	//$graph->legend->SetFont(FF_FONT1,FS_NORMAL,20);//pour petite légende en bas
	//$graph->legend->Pos(0.03,0.3);//pour petite légende en bas
	$graph->Stroke("pubparanif.png");

JpGraph Error A plot has an illegal scale. This could for example be that you are trying to use text autoscaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only '-' or 'x')


Merci