Fixes problem with popover not disappearing if charttype is change