test
JavaScript
var width = 960,
height = 500;
list_of_people = [{name: 1887, x: 40, y: 5},
{name: 1888, x: 20, y: 50},
{name: 1889, x: 40, y: 50},
{name: 1890, x: 60, y: 50},
{name: 1895, x: 60, y: 100},
{name: 1895, x: 80, y: 100}
]
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
var node = svg.selectAll(".node")
.data(list_of_people)
.enter().append("g")
.attr("class", "node")
node.append("image")
.attr("xlink:href", "https://github.com/favicon.ico")
.attr("x", function(d) {
return d.x;
})
.attr("y", function(d) {
return d.y;
})
.attr("width", 16)
.attr("height", 16);