Automatically resize SVG element based on the size of the graph.