Location: PHPKode > scripts > Charts in php > charts-in-php/example.php
<?
 include('classeGrafico.php');
 /*
 array de configuração do design do gráfico
 {configuration array, to the class view design}
*/
$config = array(
		'fundo'=>array(245,245,245),
		'legenda'=>array(220,220,220),
		'barra'=>array(240,200,200),
		'letra_barra'=>array(100,100,100),
		'letra_norma'=>array(115,105,100),
		'letra_titul'=>array(255,0,0)
		);
/*Uma string SQL {A SQL String}*/
$sql = 
"select top 25 * from myTable 
	where 
		clienteNome is not null and
		clienteNome <> ''
 group by clienteNome order by count(*) DESC ";


$tipo = 'barras';

/*
 Instanciando um novo objeto classeGrafico
 {Creating a new classeGrafico object}
*/
$grafico = new classeGrafico(
                                $tipo,
								$config,
								'192.168.1.167',
								'sa','','*****', 
								$sql,
								'Maiores Clientes'
							);
?>
Return current item: Charts in php