Modular ReactJS charts calculated using d3.js