PHP Classes

File: demos/003.php

Recommend this page to a friend!
  Classes of Tom Schaefer   d3   demos/003.php   Download  
File: demos/003.php
Role: Example script
Content type: text/plain
Description: example using sample high-level wrapper class
Class: d3
Output charts using D3.js JavaScript library
Author: By
Last change:
Date: 11 years ago
Size: 367 bytes
 

Contents

Class file image Download
<?php
include_once "../d3.classes.inc.php";
include_once
"../wrappers/sparkline.php";
?>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.7.2"></script>
<div id="sparkline" class="sparkline"></div>
<script>
<?php
$chart
= new d3Sparkline(array("height"=>64, "width" => 156, "debug" => true));
echo
$chart->render();
?>
</script>