Phonegap app Graph