PHP Classes

d3: Output charts using D3.js JavaScript library

Recommend this page to a friend!

  Author Author  
Picture of Tom Schaefer
Name: Tom Schaefer is available for providing paid consulting. Contact Tom Schaefer .
Classes: 39 packages by
Country: Germany Germany
Age: ???
All time rank: 1088 in Germany Germany
Week rank: 373 Down15 in Germany Germany Down
Innovation award
Innovation award
Nominee: 9x

Winner: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This package can output charts using D3.js JavaScript library.

It can generate HTML with JavaScript that can render charts of several types using a fluent interface calls to the classes.

The package comes with wrapper classes to render charts of types like bar, pyramid, reingold tilforld, tree map, cluster dendogram, etc..

Details
This set of classes is for creating d3 javascript charts. @see http://d3js.org/ While writing php it stacks variables, methods etc. and generates javascript code on echo. d3 charts can be written by following the fluid design pattern. So you can easily translate any d3 javascript example into php source. It supports closures, variables, methods and more. By using this class set there is no need to write html full of nearly unreadable javascript code. You can develop and write your own reusable and customizable php wrapper classes for creating d3 graphs, charts etc. The main goal of this class to provide an easy to use a php interface to the wonderful d3 library. PHP based and server side chart generation of d3 charts in a d3 related object notation is now available. Go to http://d3js.org/ and get an impression of what you can do with this class set. Instructions You can translate d3 javascript code into php code by following rules: - php arrows (->) become to javascript dots (.) - php variable dollar prefixes ($) will be removed - php closures will be transformed to javascript closures - php concatenating dots (.) within closures will be translated to javascript plus operators (+) - php is written fluently - by cloning a d3 php code new instances will created holding a copy of the original d3 js code - each d3 method is available is as magic php method within the scope of a d3 php object - js variables can be created by using d3::variable - js functions can be created by using f3 - js objects can be created by using o3 Take a look at example 002.php and see how it works. For more complex graphs examine the classes d3ClusterDendrogram (demos/005.php), d3Treemap (demos/004.php) or ReingoldTilfordTree (demos/006.php). If you created your own class, please tell me. If there is sufficient feedback I will provide an open source git hub respository where all these classes and a extensive documentation will reside. Regards Thomas Schäfer P.S.: You can easily adapt following library (http://nvd3.org/livecode/ ) which offers d3 models. This allows you to write less php code while creating stunning charts. Combined with canvg library you can export the svg charts while operating with the canvas object of supporting browsers and save them as image. But that is another story. ;-) - added an autocompletion support file. do not load this file in an ide only. do not use it in production mode.

  Classes of Tom Schaefer  >  d3  >  Download Download .zip .tar.gz  >  Support forum Support forum (2)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: d3
Base name: d3
Description: Output charts using D3.js JavaScript library
Version: 0.1
PHP version: 5.3
License: GNU General Public License (GPL)
All time users: 872 users
All time rank: 4025
Week users: 0 users
Week rank: 68 Equal
 
  Groups   Rate classes User ratings   Dependents  
  Applications   Related pages   Files Files  

  Groups  
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Graphics Colors, images, charts and picture formats View top rated classes


  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (93%) Good (93%) Good (81%) Good (87%) - - Sufficient (73%) 226
Month: Not yet rated by the users

  Other classes that need this package  
Class Why it is needed Dependency
d3Extjs base classes Required
d3Google It holds the base classes used by d3Google Required
d3Jquery It holds the base classes used by d3Jquery Required
d3Prototype base classes Required
d3Raphael base classes Required

  Applications that use this package  
Create Google Charts and Maps on top of d3
Create jQuery commands on of d3
online presentation for d3, d3google, d3jquery, d3extjs

Add link image If you know an application of this package, send a message to the author to add a link here.


  Related pages  
Another Example from d3.js org
d3 javascript library
coding d3 charts live while using neat models
do not mistake this site with my class
Male/Female pyramidal distribution
The original d3 example
Original Example
Original JS Example

  Files folder image Files  
File Role Description
Files folder imagedemos (11 files, 2 directories)
Files folder imagewrappers (7 files)
Accessible without login Plain text file d3.autocompletion.in.ide.php Data autocompletion support file
Plain text file d3.classes.0.4.php Class version 0.4, adding some new features
Plain text file d3.classes.002.php Class version 0.2, adding console, move __call to processor method for better reusability
Plain text file d3.classes.003.php Class version 0.3, fixing strict error for returnVar method
Plain text file d3.classes.inc.php Class set of basic classes for d3 charts
Accessible without login Plain text file readme.txt Doc. show hints
Accessible without login Plain text file sales.sql Data mysql data for example 060.php

  Files folder image Files  /  demos  
File Role Description
Files folder imagecss (1 file)
Files folder imagedata (4 files)
  Accessible without login Plain text file 001.php Example Some basic ops
  Accessible without login Plain text file 002.php Example live bar chart
  Accessible without login Plain text file 003.php Example example using sample high-level wrapper class
  Accessible without login Plain text file 004.php Example treemap example
  Accessible without login Plain text file 005.php Example cluster dendrogram
  Accessible without login Plain text file 006.php Example Reingold-Tilford-Tree Example
  Accessible without login Plain text file 020.php Example stacked bar chart example
  Accessible without login Plain text file 030.php Example pyramid demo chart
  Accessible without login Plain text file 040.php Example sample cluster and json
  Accessible without login Plain text file 041.php Example sunburst
  Accessible without login Plain text file 060.php Example shows how to push a sql query result into a grouped bar chart

  Files folder image Files  /  demos  /  css  
File Role Description
  Accessible without login Plain text file cluster.css Aux. style for cluster and json

  Files folder image Files  /  demos  /  data  
File Role Description
  Accessible without login Plain text file constant.js Data demo data for pyramid example
  Accessible without login Plain text file data.csv Data data csv
  Accessible without login Plain text file flare.json Data sample data
  Accessible without login Plain text file nlwest.json Data example sparkline json

  Files folder image Files  /  wrappers  
File Role Description
  Plain text file barchart.php Class wrapper class
  Plain text file clusterdendrogram.php Class cluster dendrogram
  Plain text file pyramid.php Class pyramid chart
  Plain text file reingoldtilfordtree.php Class Reingold-Tilford Tree
  Plain text file sparkline.php Class Example for a highlevel wrapper
  Plain text file stackedbarchart.php Class wrapper class
  Plain text file treemap.php Class Treemap Wrapper Class

Install with Composer Install with Composer - Download Download all files: d3.tar.gz d3.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Files folder imagedemos (11 files, 2 directories)
Files folder imagewrappers (7 files)
Accessible without login Plain text file d3.autocompletion.in.ide.php Data autocompletion support file
Plain text file d3.classes.0.4.php Class version 0.4, adding some new features
Plain text file d3.classes.002.php Class version 0.2, adding console, move __call to processor method for better reusability
Plain text file d3.classes.003.php Class version 0.3, fixing strict error for returnVar method
Plain text file d3.classes.inc.php Class set of basic classes for d3 charts
Accessible without login Plain text file readme.txt Doc. show hints
Accessible without login Plain text file sales.sql Data mysql data for example 060.php

  Files folder image Files  /  demos  
File Role Description
Files folder imagecss (1 file)
Files folder imagedata (4 files)
  Accessible without login Plain text file 001.php Example Some basic ops
  Accessible without login Plain text file 002.php Example live bar chart
  Accessible without login Plain text file 003.php Example example using sample high-level wrapper class
  Accessible without login Plain text file 004.php Example treemap example
  Accessible without login Plain text file 005.php Example cluster dendrogram
  Accessible without login Plain text file 006.php Example Reingold-Tilford-Tree Example
  Accessible without login Plain text file 020.php Example stacked bar chart example
  Accessible without login Plain text file 030.php Example pyramid demo chart
  Accessible without login Plain text file 040.php Example sample cluster and json
  Accessible without login Plain text file 041.php Example sunburst
  Accessible without login Plain text file 060.php Example shows how to push a sql query result into a grouped bar chart

  Files folder image Files  /  demos  /  css  
File Role Description
  Accessible without login Plain text file cluster.css Aux. style for cluster and json

  Files folder image Files  /  demos  /  data  
File Role Description
  Accessible without login Plain text file constant.js Data demo data for pyramid example
  Accessible without login Plain text file data.csv Data data csv
  Accessible without login Plain text file flare.json Data sample data
  Accessible without login Plain text file nlwest.json Data example sparkline json

  Files folder image Files  /  wrappers  
File Role Description
  Plain text file barchart.php Class wrapper class
  Plain text file clusterdendrogram.php Class cluster dendrogram
  Plain text file pyramid.php Class pyramid chart
  Plain text file reingoldtilfordtree.php Class Reingold-Tilford Tree
  Plain text file sparkline.php Class Example for a highlevel wrapper
  Plain text file stackedbarchart.php Class wrapper class
  Plain text file treemap.php Class Treemap Wrapper Class

Install with Composer Install with Composer - Download Download all files: d3.tar.gz d3.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.