Chart resizing, modal, code improvement