only try to get the available width for the graph if the element exists.