simplifying getChart(type)