Working accelerometer capture and d3 charting