Refactor chart models in 'ChartM'