PHP Classes

File: demos/020.php

Recommend this page to a friend!
  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: 11 years ago
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>