<?php
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_line.php');
$datay = array(25,29,29,39,55);
$graph = new Graph(400,200,'auto');
$graph->img->SetMargin(40,40,40,20);
$graph->SetScale("linlin");
$graph->SetShadow();
$graph->title->Set("Top X-axis");
$graph->yscale->SetAutoMin(0);
$graph->yscale->SetGrace(100);
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->SetPos("max");
$graph->xaxis->SetLabelSide(SIDE_UP);
$graph->xaxis->SetTickSide(SIDE_DOWN);
$p1 = new LinePlot($datay);
$p1->SetColor("blue");
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->value->Show();
$graph->Add($p1);
$graph->Stroke();
?> |