My g tag was being overlapped by another g tag (checked in developer tools) ,so when i put style pointer-events: none; in the g tag that was overlapping the issue is resolved