moved call to detectDimensions() to .on("hideAxis")