Writing some basic code to make nvd3 work with angularJS