Redid logic to use d3 stackLayout