Can this line be factored out of the conditional up above like it was before (I see it's the first line of both the `if` and the `else`).

Do you want to check to make sure that the propertyName is one of those passed to the `makeGraph` function before you decide that the graph needs to be recreated?