PHP Classes

File: samples/sample2.php

Recommend this page to a friend!
  Classes of David Frendin   TinyPie   samples/sample2.php   Download  
File: samples/sample2.php
Role: Example script
Content type: text/plain
Description: Using static method to generate various sized pies
Class: TinyPie
Generate pie charts as images embedded in HTML
Author: By
Last change: changed description
Date: 13 years ago
Size: 698 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>2. Demo "shortcut" graph, 50/50 various sizes</legend>
<?php
/*
    A more compact way of producing the same result as in demo #1.
*/
echo TinyPie::QuickImg(256, array(array(50, '555555'), array(50, '00CC00')));
echo
TinyPie::QuickImg(128, array(array(50, '555555'), array(50, '00CC00')));
echo
TinyPie::QuickImg(64, array(array(50, '555555'), array(50, '00CC00')));
echo
TinyPie::QuickImg(32, array(array(50, '555555'), array(50, '00CC00')));
echo
TinyPie::QuickImg(16, array(array(50, '555555'), array(50, '00CC00')));
?>
</fieldset>

</body>
</html>