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 20/07/2006, 08h59   #1
Membre habitué
 
Avatar de scorpking
 
Inscription : avril 2006
Messages : 207
Détails du profil
Informations personnelles :
Âge : 25

Informations forums :
Inscription : avril 2006
Messages : 207
Points : 113
Points : 113
Par défaut [JpGraph] problème d'instalation

bonjour j'ai des erreur quand je télécharge et dézip jpgraph
je l'ai tel une fois et tous les fichier de configuration tous les .php n'étaient pas là maintenant ils y sont mais apparement il me manque le dossier TTF pour les font
ce qui fais que je ne comprend rien a l'instalation
mais lequel j'ai fais mes recherche mais tout me renvoi au truc en anglais et j'ais peur de mal interpreter leurs ordre alor si quelqu'un avait un tuto un peux plus detailler sur l'instalation les lien a creer et peut etre sur les premier graph
scorpking est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/07/2006, 09h09   #2
Membre confirmé
 
Homme
Inscription : septembre 2002
Messages : 475
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 29
Localisation : France

Informations forums :
Inscription : septembre 2002
Messages : 475
Points : 222
Points : 222
Bonjour,

Pour installer JPGraph, rien de plus simple :
1-) Télécharger le fichier suivant :2-) Décompresser le fichier...
3-) Placer au minimum les fichiers suivants :
  • /jpgraph.php (fichier principal de JPGraph)
  • /jpg-config.inc.php (fichier de configuration)
  • /lang/en.inc.php (affichage des messages d'erreur)
4-) Pour faire une courbe, nous ajouterons le fichier suivant : jpgraph_line.php
5-) Exemple via le fichier "mon_image.php" :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
<?php
include ("jpgraph.php");
include ("jpgraph_line.php");
 
// Quelques données
$ydata = array(11,3,8,12,5,1,9,13,5,7);
 
// Creation du graphique. Ces deux fonctions sont obligatoirement utilisées
$graph = new Graph(350,250,"auto");    
$graph->SetScale("textlin");
 
// Creation de la courbe
$lineplot=new LinePlot($ydata);
$lineplot->SetColor("blue");
 
// Ajout de la courbe sur le graphque
$graph->Add($lineplot);
 
// Affichage du graphique
$graph->Stroke();
?>
Utilisation via le fichier "index.php" :
Code :
1
2
3
4
5
6
7
8
9
 
<html>
	<head>
		<title>Exemple d'image avec JPGraph</title>
	</head>
	<body>
		<img src="mon_image.php">
	</body>
</html>
Cordialement,
Mathieu
__________________
Embarcadero RAD Studio XE / Microsoft Windows 7 Édition Intégrale (64 bits)
MaTHieU_ est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 20/07/2006, 09h14   #3
Membre habitué
 
Avatar de scorpking
 
Inscription : avril 2006
Messages : 207
Détails du profil
Informations personnelles :
Âge : 25

Informations forums :
Inscription : avril 2006
Messages : 207
Points : 113
Points : 113
et pour plusieur courbe?
ce code là je l'avai trouvé
mais j'ai pas compri ou il falai ajouter pour en faire plusieur
scorpking est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/07/2006, 09h36   #4
Membre confirmé
 
Homme
Inscription : septembre 2002
Messages : 475
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 29
Localisation : France

Informations forums :
Inscription : septembre 2002
Messages : 475
Points : 222
Points : 222
Bonjour,

Pour plusieurs courbes, tu les ajoutes tout simplement :
Code :
1
2
3
4
5
6
7
8
9
10
 
// Quelques données
$ydata2 = array(1,4,5,19,3,1,17,3,15,9);
 
// Creation de la courbe
$lineplot2=new LinePlot($ydata2);
$lineplot2->SetColor("red");
 
// Ajout de la courbe sur le graphque
$graph->Add($lineplot2);
Cordialement,
Mathieu
__________________
Embarcadero RAD Studio XE / Microsoft Windows 7 Édition Intégrale (64 bits)
MaTHieU_ est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/07/2006, 09h38   #5
Membre habitué
 
Avatar de scorpking
 
Inscription : avril 2006
Messages : 207
Détails du profil
Informations personnelles :
Âge : 25

Informations forums :
Inscription : avril 2006
Messages : 207
Points : 113
Points : 113
merci bien Mathieu
scorpking est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2006, 17h11   #6
Membre habitué
 
Avatar de scorpking
 
Inscription : avril 2006
Messages : 207
Détails du profil
Informations personnelles :
Âge : 25

Informations forums :
Inscription : avril 2006
Messages : 207
Points : 113
Points : 113
j'ai ce message qui apparait maintenant
Citation:
Parse error: parse error in C:\Program Files\EasyPHP1-8\php\jpgraph-1.20.4\src\jpg-config.inc.php on line 35
quelqu'un a deja eu cette erreur?
scorpking est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2006, 18h45   #7
Membre confirmé
 
Homme
Inscription : septembre 2002
Messages : 475
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 29
Localisation : France

Informations forums :
Inscription : septembre 2002
Messages : 475
Points : 222
Points : 222
Bonjour,

Citation:
Typique d'une erreur de syntaxe. Vérifiez si vous n'avez pas oublié un ; (point virgule) en fin de ligne. Ou encore un $ (dollar) devant le nom d'une variable. N'hésitez pas à contrôler les lignes avoisinantes. L'erreur se trouve souvent juste au-dessus.
Si tu ne trouves pas, donne nous tes lignes 34, 35 et 36 de ton fichier "jpg-config.inc.php".

Cordialement,
Mathieu
__________________
Embarcadero RAD Studio XE / Microsoft Windows 7 Édition Intégrale (64 bits)
MaTHieU_ est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2006, 19h10   #8
Membre habitué
 
Avatar de scorpking
 
Inscription : avril 2006
Messages : 207
Détails du profil
Informations personnelles :
Âge : 25

Informations forums :
Inscription : avril 2006
Messages : 207
Points : 113
Points : 113
ben c'est celui d'origine de jpgraph que j'ai en téléchargeant
mais je l'ai pas sur cet ordinateur
scorpking est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2006, 19h14   #9
Membre confirmé
 
Homme
Inscription : septembre 2002
Messages : 475
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 29
Localisation : France

Informations forums :
Inscription : septembre 2002
Messages : 475
Points : 222
Points : 222
Bonjour,

Dans ce cas, donne nous le code qui génère ton graphique.

Cordialement,
Mathieu
__________________
Embarcadero RAD Studio XE / Microsoft Windows 7 Édition Intégrale (64 bits)
MaTHieU_ est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/07/2006, 19h19   #10
Membre habitué
 
Avatar de scorpking
 
Inscription : avril 2006
Messages : 207
Détails du profil
Informations personnelles :
Âge : 25

Informations forums :
Inscription : avril 2006
Messages : 207
Points : 113
Points : 113
je le métrai demain a partir de mon ordinateur de travail
scorpking est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/07/2006, 08h35   #11
Membre habitué
 
Avatar de scorpking
 
Inscription : avril 2006
Messages : 207
Détails du profil
Informations personnelles :
Âge : 25

Informations forums :
Inscription : avril 2006
Messages : 207
Points : 113
Points : 113
Citation:
//------------------------------------------------------------------------
// Directories for cache and font directory.
//
// CACHE_DIR:
// The full absolute name of the directory to be used to store the
// cached image files. This directory will not be used if the USE_CACHE
// define (further down) is false. If you enable the cache please note that
// this directory MUST be readable and writable for the process running PHP.
// Must end with '/'
//
// TTF_DIR:
// Directory where TTF fonts can be found. Must end with '/'
//
// The default values used if these defines are left commented out are:
//
// UNIX:
// CACHE_DIR /tmp/jpgraph_cache/
// TTF_DIR /usr/X11R6/lib/X11/fonts/truetype/
// MBTTF_DIR /usr/share/fonts/ja/TrueType/
//
// WINDOWS:
CACHE_DIR $SERVER_TEMP/jpgraph_cache/ L35
TTF_DIR $SERVER_SYSTEMROOT/fonts/ L36
MBTTF_DIR $SERVER_SYSTEMROOT/fonts/ L37
//
//------------------------------------------------------------------------


voila ce sont ces lignes
scorpking est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/07/2006, 09h19   #12
Membre confirmé
 
Homme
Inscription : septembre 2002
Messages : 475
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 29
Localisation : France

Informations forums :
Inscription : septembre 2002
Messages : 475
Points : 222
Points : 222
Bonjour,

Ce ne sont pas des lignes PHP valides

Essai plutôt de cette forme là :
Code :
1
2
 
DEFINE("CACHE_DIR","$SERVER_TEMP/jpgraph_cache/");
Cordialement,
Mathieu
__________________
Embarcadero RAD Studio XE / Microsoft Windows 7 Édition Intégrale (64 bits)
MaTHieU_ est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 19/10/2011, 13h21   #13
Invité de passage
 
Inscription : août 2009
Messages : 13
Détails du profil
Informations forums :
Inscription : août 2009
Messages : 13
Points : 1
Points : 1
Par défaut jpgraph et php

salut j'ai conçu un site et la je veux fares des statististiques .
alors je vu sur le net que jpgraph et approprié pour ca .
mais je sais meme pas comment l'utiliser (installation et configuration )
dans mes recherche .
j'ai tenter quelque chose qui marche pas .
alors je suis ici pour de l'aide.
j'ai telecharger jpgraph-3.0.7.tar.gz

j'ai decompresser dans c:/wamp/www/INSCRIPTION/jpgraph/src
voici donc le chemin ou se trouve les fichiers de jpgraph
NB: mes fichier php se trouve dans INSCRIPTION

sur le net les paramètre qui doivent être verifiers sont bonnes . je veux parler de :
-extension=php_gd2.dll qui était déjà decommenter


-<?
phpinfo();
?>

ma permis de savoir que la version de jpgraph est la bonne.


voici le code php que jai essayé de visualiser dans ma page web . mais rien ne s'affiche . alors esque quelqu'un pourait m'aider dans les detail pret a utiliser jpgraph

voici le 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
 
<?php
require_once("i.../jpgraph/src/nclude_path_inc.php");
 
require_once(".../jpgraph/src/jpgraph.php");
require_once(".../jpgraph/src/jpgraph_bar.php");
 
$donnees = array(12,23,9,58,23,26,57,48,12);
 
$largeur = 250;
$hauteur = 200;
 
// Initialisation du graphique
$graphe = new Graph($largeur, $hauteur);
// Echelle lineaire ('lin') en ordonnee et pas de valeur en abscisse ('text')
// Valeurs min et max seront determinees automatiquement
$graphe->setScale("textlin");
 
// Creation de l'histogramme
$histo = new BarPlot($donnees);
// Ajout de l'histogramme au graphique
$graphe->add($histo);
 
// Ajout du titre du graphique
$graphe->title->set("Histogramme");
 
// Affichage du graphique
$graphe->stroke();
?>
msi79 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 11h16.


 
 
 
 
Partenaires

Hébergement Web