SVG

w = "100%";h = 100;
var svg = d3.select("#my3d").append("svg").attr("width", w).attr("height", h);
Circle
var dataset = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34];
var circles = svg.selectAll("circle").data(dataset).enter().append("circle");circles.attr("cx", function(d, i) {
	return (i * 60) + 30;
}).attr("cy", h / 2).attr("r", function(d) {
	return d;
});
 

Style

.attr("fill", "yellow")
.attr("stroke", "orange")
.attr("stroke-width", function(d) {
	return d / 2;
})
 
Go to top