Exemplo n.º 1
0
$barChart->addDataSet(array(0,10,20,30,20,70,80));<br>
$barChart->addDataSet(array(0,20,10,5,20,30,10));<br>
$barChart->addHiddenDataSet(array(10,0,20,15,60,40,30));<br>
$barChart->addValueMarkers('D','76A4FB',2,0,3);<br>
$barChart->setAutoBarWidth();<br>
</code>
</p>
<h2>Candlestick Chart</h2>
<?php 
$candlestick = new gLineChart(200, 125);
$candlestick->addDataSet(array(90, 80, 70, 50, 40, 30, 20, 10));
$candlestick->addHiddenDataSet(array(0, 5, 10, 0, 5, 10, 0));
$candlestick->addHiddenDataSet(array(2, 15, 20, 5, 15, 40, 0));
$candlestick->addHiddenDataSet(array(5, 35, 20, 2, 35, 20, 0));
$candlestick->addHiddenDataSet(array(15, 40, 30, 15, 40, 50, 0));
$candlestick->addValueMarkers('F', '000000', 1, '1:-2', 20);
$candlestick->setVisibleAxes(array('y'));
$candlestick->addAxisRange(0, 0, 100);
?>
<img src="<?php 
print $candlestick->getUrl();
?>
" /> <br> compound bar chart using the gGroupedBarChart class and addValueMarkers().
<p>
<em>code:</em><br>
<code>
$candlestick = new gLineChart(200,125);<br>
$candlestick -> addDataSet(array(90,80,70,50,40,30,20,10));<br>
$candlestick -> addHiddenDataSet(array(0,5,10,0,5,10,0));<br>
$candlestick -> addHiddenDataSet(array(2,15,20,5,15,40,0));<br>
$candlestick -> addHiddenDataSet(array(5,35,20,2,35,20,0));<br>