The current behavior is that each subsequent click to "Edit graph
settings" leads to more and more calls to click event listener. You can
check it from browser's developer console. They all do the same thing,
so from user's view nothing is wrong. This fix is ugly as well but
removes listener before adding the new (same) one.