fixed chart layout on first click by creating container first