Update graph dynamically.