fully working realtime graph with data input and caching