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
| <?php
require_once "../LinePlot.class.php";
$graph = new Graph(900, 300);
$graph->setAntiAliasing(TRUE);
$graph->title->set('Chromato Labo 1');
$total = unserialize(urldecode($_POST['tableauordonnee']));
$peak_time1 = unserialize(urldecode($_POST['tableauabscisse']));
$plot = new LinePlot($total,$peak_time1 );
$plot->xAxis->label->hide(TRUE);
//$plot->xAxis->hideTicks(TRUE);
$plot->setXAxis(Plot::BOTTOM);
$plot->setXAxisZero(FALSE);
$plot->label->set($peak_time1);
$plot->xAxis->setLabelInterval(10);
$plot->setColor(new Color(255, 255, 255, 0));
// Set a background gradient
$plot->setBackgroundGradient(
new LinearGradient(
new Color(210, 210, 210),
new Color(255, 255, 255),
0
)
);
// Set line background gradient
$plot->setFillGradient(
new LinearGradient(
new Color(150, 150, 210),
new Color(230, 230, 255),
90
)
);
// Change grid background color
$plot->grid->setBackgroundColor(
new Color(235, 235, 180, 60)
);
$plot->setPadding(NULL, NULL, 40, 40);
$graph->add($plot);
$graph->draw();
//print_r($peak_time1);
//print_r($total);
?> |
Partager