This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/includes/jpgraph/src/Examples/bargradsmallex8.php

35 lines
786 B
PHP
Raw Normal View History

2011-05-28 09:51:52 +00:00
<?php // content="text/plain; charset=utf-8"
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_bar.php');
// We need some data
$datay=array(4,8,6);
// Setup the graph.
$graph = new Graph(200,150);
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);
$graph->title->Set('"GRAD_RAISED_PANEL"');
$graph->title->SetColor('darkred');
// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);
// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);
// Setup color for gradient fill style
$bplot->SetFillGradient('navy','orange',GRAD_RAISED_PANEL);
// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);
// Finally send the graph to the browser
$graph->Stroke();
?>