prevent chart flickering when switching tabs/years