Précédent   Forum des professionnels en informatique > PHP > Bibliothèques et frameworks > Images > JpGraph
JpGraph Forum d'entraide pour la bibliothèque JpGraph permettant de manipuler des images en PHP. Avant de poster -> tutoriels JpGraph
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 24/03/2007, 13h18   #1
Candidat au titre de Membre du Club
 
Inscription : janvier 2007
Messages : 77
Détails du profil
Informations forums :
Inscription : janvier 2007
Messages : 77
Points : 14
Points : 14
Par défaut [JpGraph] Positionner un graphique dans un tableau

Bonjour à tous,
j'utilise JPGraph pour créer des statistiques sous la forme d'un camenbert mais je n'arrive pas à le positionner dans un tableau; j'obtiens le message d'erreur suivant :Internal error: Chosen locale file for error messages does not exist. alors que si je ne l'inclus pas dans mon tableau tout fonctionne parfaitement.

Comment faire pour alors pour positionner mon camenbert dans mon tableau ?

Voici mon code :
Code :
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
 
<?php
include ("../../graph/jpgraph.php");
include ("../../graph/jpgraph_pie.php");
$db = mysql_connect('localhost', 'root', '') or die('erreur');
mysql_select_db('Mediatheque',$db) or die('erreur');
 
$DVD="select FldIdRef from tblDVD";
$DVD = mysql_query($DVD) or die('Erreur SQL !<br>'.$DVD.'<br>'.mysql_error());
//$row_RsListeDVD = mysql_fetch_assoc($DVD);
$totalRows_DVD = mysql_num_rows($DVD);
 
$STV="select distinct FldIdRef from tblseriestv";
$STV = mysql_query($STV) or die('Erreur SQL !<br>'.$STV.'<br>'.mysql_error());
//$row_RsListeSTV = mysql_fetch_assoc($STV);
$totalRows_STV = mysql_num_rows($STV);
 
$VHS="select FldIdRef from tblvhs";
$VHS = mysql_query($VHS) or die('Erreur SQL !<br>'.$VHS.'<br>'.mysql_error());
//$row_RsListeVHS = mysql_fetch_assoc($VHS);
$totalRows_VHS = mysql_num_rows($VHS);
 
$data = array($totalRows_DVD,$totalRows_STV,$totalRows_VHS);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Les Statistiques sur les Films</title>
</head>
<body
<table width="99%" height="600" cellpadding="0" cellspacing="0" border="0">
  <tr>
<?
// Create the Pie Graph. 
$graph = new PieGraph(500,350,"auto");
$graph->SetShadow();
 
// Set A title for the plot
$graph->title->Set("Statistiques sur les Films");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
// Create
$p1 = new PiePlot($data);
$p1->SetLegends(array("DVD","Série Télévisée","Vhs"));
$graph->Add($p1);
$graph->Stroke();
?>
</tr></table
</body>
</html>
Merci
olivier94 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 24/03/2007, 14h38   #2
Candidat au titre de Membre du Club
 
Inscription : janvier 2007
Messages : 77
Détails du profil
Informations forums :
Inscription : janvier 2007
Messages : 77
Points : 14
Points : 14
Citation:
Envoyé par olivier94
Bonjour à tous,
j'utilise JPGraph pour créer des statistiques sous la forme d'un camenbert mais je n'arrive pas à le positionner dans un tableau; j'obtiens le message d'erreur suivant :Internal error: Chosen locale file for error messages does not exist. alors que si je ne l'inclus pas dans mon tableau tout fonctionne parfaitement.
Comment faire pour alors pour positionner mon camenbert dans mon tableau ?

Voici mon code :
Code :
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
 
<?php
include ("../../graph/jpgraph.php");
include ("../../graph/jpgraph_pie.php");
$db = mysql_connect('localhost', 'root', '') or die('erreur');
mysql_select_db('Mediatheque',$db) or die('erreur');
 
$DVD="select FldIdRef from tblDVD";
$DVD = mysql_query($DVD) or die('Erreur SQL !<br>'.$DVD.'<br>'.mysql_error());
//$row_RsListeDVD = mysql_fetch_assoc($DVD);
$totalRows_DVD = mysql_num_rows($DVD);
 
$STV="select distinct FldIdRef from tblseriestv";
$STV = mysql_query($STV) or die('Erreur SQL !<br>'.$STV.'<br>'.mysql_error());
//$row_RsListeSTV = mysql_fetch_assoc($STV);
$totalRows_STV = mysql_num_rows($STV);
 
$VHS="select FldIdRef from tblvhs";
$VHS = mysql_query($VHS) or die('Erreur SQL !<br>'.$VHS.'<br>'.mysql_error());
//$row_RsListeVHS = mysql_fetch_assoc($VHS);
$totalRows_VHS = mysql_num_rows($VHS);
 
$data = array($totalRows_DVD,$totalRows_STV,$totalRows_VHS);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Les Statistiques sur les Films</title></head>
<body
<table width="99%" height="600" cellpadding="0" cellspacing="0" border="0">
  <tr>
<?
// Create the Pie Graph. 
$graph = new PieGraph(500,350,"auto");
$graph->SetShadow();
 
// Set A title for the plot
$graph->title->Set("Statistiques sur les Films");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
// Create
$p1 = new PiePlot($data);
$p1->SetLegends(array("DVD","Série Télévisée","Vhs"));
$graph->Add($p1);
$graph->Stroke();
?>
</tr></table>
</body>
</html>
Merci
olivier94 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 00h46.


 
 
 
 
Partenaires

Hébergement Web