Login   Register  
PHP Classes
elePHPant
Icontem

File: samples/sample3.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of David Frendin  >  TinyPie  >  samples/sample3.php  >  Download  
File: samples/sample3.php
Role: Example script
Content type: text/plain
Description: Sample of using TinyPie in tables
Class: TinyPie
Generate pie charts as images embedded in HTML
Author: By
Last change: changed description
Date: 2 years ago
Size: 1,026 bytes
 

Contents

Class file image Download
<?php
include('../lib/TinyPie.php');
?>
<html>
<body>

<a href="index.php">&lt;&lt;&nbsp;Back to list</a>

<fieldset>
    <legend>3. Demo usage sample in table</legend>
    <table cellpadding="5" cellspacing="0">
        <thead style="background: #000000; color: #FFFFFF;">
            <tr>
                <td></td>
                <td>Customer</td>
                <td>Spent</td>
                <td>Rank</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><?php echo TinyPie::QuickImg(16, array(array(70000'00CC00'), array(157500'555555'))); ?></td>
                <td>Drew</td>
                <td>$70.000</td>
                <td>1</td>
            </tr>
            <tr style="background: #EEEEFF;">
                <td><?php echo TinyPie::QuickImg(16, array(array(56200'00CC00'), array(157500'555555'))); ?></td>
                <td>Mark</td>
                <td>$56.200</td>
                <td>2</td>
            </tr>
            <tr>
                <td><?php echo TinyPie::QuickImg(16, array(array(31300'00CC00'), array(157500'555555'))); ?></td>
                <td>Steve</td>
                <td>$31.300</td>
                <td>3</td>
            </tr>
        </tbody>
    </table>
</fieldset>

</body>
</html>