Go to http://d3js.org/ and get an impression of what you can do with this class set.
- php variable dollar prefixes ($) will be removed
- 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.
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.