plotting chart from restful data in phonegap