migrating to d3 chart