chart api commands & refactor