graphData is a function now