Adjust svg height according to the number of nodes returned