Well, it works for me as intended with yEd 3.10.1 on Kubuntu Linux and viewing the PDF in Adobe Reader:
Which version of yEd and which PDF viewer were you using?
Re: >Unfortunately, I am not able to upload a screenshot. Why not? All you need to do is "Edit" or "Answer" your original post and use the image upload from the toolbar (2nd row, 8th from right). Moreover, a related GraphML file would certainly be helpful, too. See How to upload files to yEd Q&A? for information on how to upload non-image files.