Made the graph more responsive to screen size

Made the graph more responsive to screen size to fix the issue that
nodes were overlapping on smaller screens.