Login   Register  
PHP Classes
elePHPant
Icontem

File: demos/006.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  d3  >  demos/006.php  >  Download  
File: demos/006.php
Role: Example script
Content type: text/plain
Description: Reingold-Tilford-Tree Example
Class: d3
Output charts using D3.js JavaScript library
Author: By
Last change:
Date: 2 years ago
Size: 681 bytes
 

Contents

Class file image Download
<?php 
include_once "../d3.classes.inc.php";
include_once 
"../wrappers/reingoldtilfordtree.php";
?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: auto;
  position: relative;
  width: 960px;
}

.node circle {
  fill: #fff;
  stroke: steelblue;
  stroke-width: 1.5px;
}

.node {
  font: 10px sans-serif;
}

.link {
  fill: none;
  stroke: #ccc;
  stroke-width: 1.5px;
}

</style>
<?php echo d3::script();?>
</head>
<body>
<script>
<?php
$chart 
= new d3ReingoldTilfordTree(array("width"=>960));
echo 
$chart->render();
?>
</script>
</body>
</html>