Develop chart model with d3