I am using the voronoi arc map example http://bl.ocks.org/mbostock/7608400 And I can successfully visualise my dataset for import export trades.
However I am not able to change the properties of the individual paths generated at specific localities. I use .airport-arcs to make those paths and I would like to have variable "stroke-width" or "color" of the individual lines. I have tried several options, such as :
var color = d3.scale.category20();
...
var td = svg.selectAll(".airport-arcs")
td.style("stroke", function(d) { return color(d.count); });
td.attr("stroke-width", function(d) { return Math.log(d.count); });
which appears to change all the stroke-width by the same quantity, while colors are different for all the links generated at a given locality (but different between localities). Any suggestion on how to change the attributes for the individual paths?