separate thread for graph diagram