Add graph element relabelling functionality