salut, j'ai un problème avec les camemberts et histogrammes horizontaux.
En effet ils fonctionnent en localhost mais pas sur mon hébergeur free alors que je ne change rien.
voila le code :
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
//création du graphique
$graph = new Graph(510,370,'auto');
$graph->SetScale("textlin");
$graph->SetShadow();
 
//90 degrés et marges
$graph->Set90AndMargin(100,30,60,30);
 
//axe des abscisses
$graph->xaxis->SetTickLabels($tableauStatuts);
//$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,11);
$graph->xgrid->Show(true,true);
 
//marges pour les étiquettes
//par rapport au bord droit du graphique
$graph->xaxis->SetLabelMargin(10);
 
//axe des ordonnées
$graph->yaxis->scale->SetGrace(20);
//angle des étiquettes
$graph->yaxis->SetLabelAngle(45);
$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL, 8);
 
//création de l'histogramme
$histo = new BarPlot($tableauEffectif);
 
//couleurs des barres
$histo->SetFillColor(array("green","red", "blue", "yellow"));
//ombre
$histo->SetShadow();
//épaisseur des histogrammes
$histo->SetWidth(0.5);
 
// Valeurs
$histo->value->Show();
$histo->value->SetFont(FF_ARIAL,FS_BOLD,12);
$histo->value->SetColor("blue");
//ajout de l'histo au graph
$graph->Add($histo);
//titre
$graph->title->Set("AUVERGNE");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
 
// Afficher
 
$graph->Stroke("histoStatutAuvergne.png");
donc le problème est sur les FF_ARIAL et FF_VERDANA.
ereur :
Warning: file_exists() [function.file-exists]: Unable to access /usr/X11R6/lib/X11/fonts/truetype/verdana.ttf in /mnt/101/sdb/8/1/pweb1/gestion09/jpgraph/jpgraph_ttf.inc.php on line 372
JpGraph Error Font file "/usr/X11R6/lib/X11/fonts/truetype/verdana.ttf" is not readable or does not exist.

il ne reconnait pas verdana ainsi qu'arial. J'ai essayé de mettre FF_FONT1 partout à la place mais ca ne marche pas non plus ainsi que de ne mettre aucun font.le seul font qui marche c'est le dernier FF_FONT1.

merci de votre aide si quelqu'un passe sur ce forum peu fréquenté.