Implemented graph data retrieval code for controller