Use this code to add diagram: