Implemented color scale on d3 directive