Create a angularjs controller for making a chart