I built a bubble chart based on d3.js. So far it is working well. Now the designer wants it to have a more specific layout and ordering. As I'm not working with d3 from day to day it is a bit frustrating, figuring this out.
This is my pen so far and this is what I try to achieve (upper version is my current layout and lower version which I am aiming to):
- Descending order, starting from the left floating to the right
- More horizontal and less vertical layout
This is what my sorting looks like right now.
var nodes = d3.hierarchy(data)
.sum(function(d) { return d.value; })
.sort(function(a, b) { return -(a.value - b.value); });
and this is what I've also been trying
var nodes = d3.hierarchy(data)
.sum(function(d) { return d.value; })
//.sort(function(a, b) { return 1; });
I am gratefulfor any hint because i really spent a lot of time searching for solutions til now.