refactor chart windows