refactored d3Charts.init() added legacy charts function