my attempt to create a charting library using d3,js