Unreviewed race condition fix. Exit early when xScale or yScale is not defined.