Bonjour à tous,

Voulu utliser la bilbiotheque JPGRAPH j'ai fait de simple tests de celle-ci.

Fichier 1 : graph1.php
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
 
 <?php // content="text/plain; charset=utf-8"
			require_once ('../jpgraph/src/jpgraph.php');
			require_once ('../jpgraph/src/jpgraph_pie.php');
			require_once ('../jpgraph/src/jpgraph_pie3d.php');
 
			// Some data
			$data = array(15,15,30,40);
 
			// Create the Pie Graph. 
			$graph = new PieGraph(520,350);
 
 
 
 
			// Set A title for the plot
			$graph->title->Set("A Simple 3D Pie Plot");
 
			// Create
			$p1 = new PiePlot3D($data);
			$graph->Add($p1);
 
			$graph->SetTheme("water");
			$p1->ShowBorder();
			$p1->SetColor('red');
			$p1->ExplodeAll();;
 
			$graph->Stroke();
 
			?>
Fichier 2 : index.php

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
 
<html>
    <head>
        <meta charset="utf-8" />
		<link rel="stylesheet" type="text/css" href="index.css" media="all"/>
	<link rel="shortcut icon" href="data/favicon.ico" type="img" /> <!-- image favicon -->
	<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap" rel="stylesheet"> 
        <title>N</title>
	<!-- appel de la librairie jquery --> 
 
    </head>
    <script type="text/javascript" src="../lib/jquery.js"></script>   
    <body>
<div id="graphe" >
		<?php echo '<img src="graph1.php" />'; ?>
		</div>
 
 
<?php require 'accueil/script_update_stock.php';?>
	 <!-- javascript -->
	 <script src="script.js"></script>
    </body>
</html>
Impossible d'afficher l'image du PIE .. j'ai un symbole d'image cassée.

Avez-vous des idées ?
PS : j'ai fait des recherches sur d'autres forums, pas de réponses à ma question.
Bonne journée