andy_l143
Forum Replies Created
-
Forum: Plugins
In reply to: [Wp-D3] WordPress-d3 For DummiesHey!!
I am hoping that one of you can help me with what I hope is a fairly simple problem I am having.
I followed @p_ebox’s step-by-step and everything worked perfect! Thank you so much for such a thorough guide!
Now, I am attempting to put a D3 project I did in class up on my site. Here is the problem or at least the only one that I can think of. I am at step 10.A and I don’t have a line in my code that reads, “d3.tsv(“data.tsv”, type, function(error, data) {“.
So, I am not exactly sure where to put the URL that links to my data that is in csv format. I have been trying to plug the URL into different spots where I think it should go to no avail.
var svg = d3.select("#killer-data") .append("svg") .attr("height", 3000) .attr("width", 1100); var current_data; var complete_data; function render() { var killers = svg.selectAll(".killer") .data(current_data, function(d) { return d['name']; }); var entering = killers.enter() .append("g") .attr('opacity', 1) .attr("class","killer") .attr("transform", function(d, i) { return "translate(0," + 40 * i + ")"; }) .on('click', function(d) { console.log(d); });
Above is the area in where I think I need to plug in the URL but I am just not entirely sure where. Any help would be so appreciated.
Also, this is my first time posting to this forum so if I am doing something erroneous please let me know!
Thank you in advance for any help you can extend!