Fix TypeError when calling deselectAll on bar chart before it's rendered for first time