Fixed issue with serializing the JSON response and updating the graph