Location: PHPKode > scripts > Bar Graphics > bar-graphics/testGraphs.php
<?php
/**
 * testGraphs.php
 * @author Emmanuel Arana Corzo <hide@address.com>
 */
 
 include("libs/barGraphics.class.php");
 $graphic = new BarGraphicPercent(1000);                //Es el ancho de la gráfica
 $graphic->addColumn("Columna 1", 25.2, "#CCCCCC");     //Agrega la columna 1
 $graphic->addColumn("Columna 2", -25.2, "#AAAAAA");    //Agrega la columna 2
 $graphic->addColumn("Columna 3", 100.32, "#999999");	//...
 $graphic->addColumn("Columna 4", 88.236, "#777777");
 $graphic->addColumn("Columna 5", 111.236, "#555555");
 
?>
<html>
<head>
<title>Test graphs</title>
<style>
<!--

.cell_header {
	font-family: "Arial Narrow";
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	font-weight: bold;
	font-variant: normal;
	text-transform: uppercase;
	color: #E0E0E0;
	text-decoration: none;
	background-color: #4E4E4E;
}
.cell_shaded {
	font-family: "Arial Narrow";
	font-size: 10px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	color: #333333;
	text-decoration: none;
	background-color: #9DBAD7;
}
.cell_normal {
	font-family: "Arial Narrow";
	font-size: 10px;
	font-style: normal;
	line-height: normal;
	font-weight: normal;
	font-variant: normal;
	color: #333333;
	text-decoration: none;
	background-color: #FFFFFF;
}
.button {
	font-family: "Arial Narrow";
	cursor: hand;
	color: #666666;
	background-image: url(img/FairytaleWorld/22x22/actions/viewmag.png);
	background-repeat: no-repeat;
}
.icon_links_off {
	font-family: "Arial Narrow";
	font-size: 10px;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: lowercase;
	color: #333333;
	text-decoration: none;
}
.icon_links_on {
	font-family: "Arial Narrow";
	font-size: 10px;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: lowercase;
	color: #F3F3F3;
	text-decoration: none;
	background-color: #1F4A76;
}
-->
</style>
</head>

<body>
<?php
$graphic->drawGraph("cell_normal");  //Simplemente dibujo la gráfica
unset($graphic);
?>
</body>
</html>
Return current item: Bar Graphics