refactoring of smaller charts