refactor: separation of data from chart setup