Add A Legend To D3 Force Directed Graph
So I am trying to create a legend in the bottom right corner of my D3. I have written all of the code for the legend but it comes up as just a black screen with the force-directed
Solution 1:
This is incorrect:
var legend = d3.append('svg').append("g")
should have been (you should append, the g group which holds legend to the svg)
var legend = svg.append("g")
Post a Comment for "Add A Legend To D3 Force Directed Graph"