Esempio n. 1
0
    <a href="https://github.com/kevinkhill/" id="forkMe">
        <img src="<?php 
echo asset('images/forkme.png');
?>
" alt="Fork me on GitHub">
    </a>

    <h1 class="exampleTitle">
        <?php 
echo link_to('/lavacharts/examples', 'LavaChart Examples');
?>
 \ Basic A Chart
    </h1>
    <?php 
echo Lava::AreaChart('Stocks')->outputInto('stock_div');
echo Lava::div(1000, 400);
if (Lava::hasErrors()) {
    echo Lava::getErrors();
}
?>

<br />

<div class="prettyprintContainer">
<span class="prettyprintContainerLabel">Closure Route/Controller</span>
<div class="prettyprintCode">
<pre class="prettyprint linenums">
$stocksTable = Lava::DataTable('Stocks');

$stocksTable->addColumn('date', 'Date', 'date')
            ->addColumn('number', 'Projected', 'projected')
<h1><?php 
echo link_to('/', 'Codeigniter gChart Examples');
?>
 \ Advanced Line Chart</h1>
<?php 
echo Lava::LineChart('Times')->outputInto('time_div');
echo Lava::div(800, 500);
if (Lava::hasErrors()) {
    echo Lava::getErrors();
}
?>

<hr />

<h2>Controller Code</h2>
<pre style="font-family:Courier New, monospaced; font-size:10pt;border:1px solid #000;background-color:#f2f2f2;padding:5px;">

</pre>

<h2>View Code</h2>
<pre style="font-family:Courier New, monospaced; font-size:10pt;border:1px solid #000;background-color:#f2f2f2;padding:5px;">
echo Lava::LineChart('Times')->outputInto('time_div');
echo Lava::div(800, 500);

if(Lava::hasErrors())
{
    echo Lava::getErrors();
}
</pre>