Login   Register  
PHP Classes
elePHPant
Icontem

File: demos/020.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/020.php  >  Download  
File: demos/020.php
Role: Example script
Content type: text/plain
Description: stacked bar chart example
Class: d3
Output charts using D3.js JavaScript library
Author: By
Last change:
Date: 2012-11-22 09:18
Size: 533 bytes
 

Contents

Class file image Download
<?php 
include_once "../d3.classes.inc.php";
include_once 
"../wrappers/stackedbarchart.php";
?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
  font: 10px sans-serif;
}

.axis path,
.axis line {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

.bar {
  fill: steelblue;
}

.x.axis path {
  display: none;
}

</style>
<?php echo d3::script();?>
</head>
<body>
<script>
<?php
$chart 
= new d3StackedBarChart();
echo 
$chart->render();
?>
</script>
</body>
</html>