hooked up graph building to json data