Fix issue where old bar labels stick around on dataset change.

Add unit test.
can you move that inside if statement?