Login   Register  
PHP Classes
elePHPant
Icontem

d3

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      d3  >  All threads  >  d3  >  (Un) Subscribe thread alerts  
Subject:d3
Summary:d3
Messages:4
Author:Sanni Islamiyat
Date:2012-12-05 09:05:37
Update:2013-12-13 10:13:14
 

  1. d3   Reply   Report abuse  
Picture of Sanni Islamiyat
Sanni Islamiyat
2012-12-05 09:05:37
Good work but how do I make use of it with my own data.

  2. Re: d3   Reply   Report abuse  
Picture of Tom Schaefer
Tom Schaefer
2012-12-15 20:37:25 - In reply to message 1 from Sanni Islamiyat
There are different ways to work with data in d3.

(1)
CSV, JSON, XML, XHR (Ajax), XML, Text are supported by d3.js.

e.g.
$r = d3()->csv("data.csv", function(data){

});

or

$f = f3("data")->add("your js code here");
$r = d3()->csv("data.csv", $f);


By this you can load csv data from the server and process it within the callback function. It is being processed in the browser.


(2)
you json_encode your data records into a structure that can be handeld by d3-scripts.

  3. Re: d3   Reply   Report abuse  
Picture of Tom Schaefer
Tom Schaefer
2012-12-16 15:14:41 - In reply to message 1 from Sanni Islamiyat
I added an example which shows the usage of json data.
See demos/040.php

  4. Re: d3   Reply   Report abuse  
Picture of Rakesh Kumar
Rakesh Kumar
2013-12-13 10:13:14 - In reply to message 3 from Tom Schaefer
I can't see the output for 040.php. Also, I saw your https://github.com/tscgist/tscSnippets/blob/master/nvd3.classes.inc.php without any examples. I also wrote in a test email to you.