Switch to C3.js which providing a better interface to D3 for charting.