Added events to automatically update data source for graph when graph is
changed.