chart refactor, improvements