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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
<?php
session_start();
include("entete.php");
include("menu.php");
require_once ("Util.php");
require_once ("Formulaire.php");
?>
<html>
<head>
<div class="contenu">
<?php
// On vérifie que les données à afficher sur le graphique existent
if(isset($_POST['values']) === FALSE)
{
exit;
}
// On récupère les valeurs à afficher sur le graphique dans $_POST['values'] et on les désérialize
$data = @unserialize($_POST['values']);
//$Site=$_POST["Site"];
//$NumTranche=$_POST["NumTranche"];
//$NomCapteur=$_POST["NomCapteur"];
// On vérifie que les données passées en POST sont correctes
if(is_array($data) === FALSE)
{
exit;
}
require_once ".\Artichow-php4+5\LinePlot.class.php";
$graph = new Graph(750, 370);
$graph->setAntiAliasing(TRUE);
// On créé une courbe basique avec les données
$plot = new LinePlot($data);
// Set a background gradient
$plot->setBackgroundGradient(
new LinearGradient(
new Color(210, 210, 210),
new Color(255, 255, 255),
0
)
);
// Set semi-transparent background gradient
$plot->setFillGradient(
new LinearGradient(
new Color(230, 150, 150, 20),
new Color(230, 230, 180, 50),
90
)
);
// On créé le graphique et on y ajoute la courbe
$plot->yAxis->setLabelPrecision(1);
$plot->xAxis->label->setInterval(10);
// Set title
//$graph->title->set('Spectre de '.$Site ." Tranche ". $NumTranche . " Capteur ". $NomCapteur);
$plot->yAxis->title->set("Db");
$plot->yAxis->title->setFont(new TuffyBold(10));
$plot->yAxis->title->move(-4, 0);
$plot->yAxis->setTitleAlignment(LABEL_TOP);
$plot->xAxis->title->set("Hz");
$plot->xAxis->title->setFont(new TuffyBold(10));
$plot->xAxis->setTitleAlignment(LABEL_RIGHT);
$graph->add($plot);
$graph->draw();
?>
</div>
<?php
include("pied.php");
?>
</body>
</html> |
Partager