cache cumulative values to speed up graph creation