score:2

Accepted answer

If the file is in the same directory just use the following D3 method :

d3.csv("nameOfCsv.csv", function(thisData){...

You can do all the work inside this function or just attach 'thisData' to a variable and use it elsewhere.

Example :

//set variable wherever you want, global if need be to be accessed by all functions. 
//I would recommend not naming it just data as it may conflict 
//but for the sake of this example 

var data;

d3.csv("nameOfCsv.csv", function(thisData) {
      data = thisData;
    }

Now you can use this data in your functions like so :

var chart = new dimple.chart(svg, data);

Related Query

More Query from same tag