PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Omar Ortiz   cSpeedometer   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example file
Class: cSpeedometer
Render a speed meter as image or HTML5 canvas
Author: By
Last change: add svg and canvas with gradient effect examples
Date: 11 years ago
Size: 1,567 bytes


Class file image Download
$colors = array(BORDER => "black",SPD_MARK=>"darkRed");
$sp1 = new cSpeedometer(250, $colors);
$colors = array(BCKGND => "gray",BORDER => "darkGray");
$sp2 = new cSpeedometer(250,$colors);
$sp3 = new cSpeedometer(250);
$colors = array(BORDER => "darkBlue",SPD_MARK=>"darkGreen",SPEED=>"green",SPD_IND=>"black");
$sp4 = new cSpeedometer(250,$colors);
<!DOCTYPE html>
<table width='100%' border='1'>
<tr><td colspan="2" align="center">Help Desk Status</td></tr>
<tr><td align='center'><img src='./tmp/sp1.png'><br>% Closed Tickets on Time (PNG)</td>
<td align='center'><img src='./tmp/sp2.gif'><br>Avg. of Daily Closed Tickets (GIF)</td></tr>
<tr><td align='center'><? echo $sp3->getSVG("sp3", 0); echo $sp3->getCanvas("sp3c", 0, true);?><br>Avg. of Days to Close a Ticket (HTML5 SVG & CANVAS)</td>
<td align='center'><img src='./tmp/sp4.jpg'><br>Tickets Exceeded Time in the Month (JPG)</td></tr>