Creating a real-time graph