refactoring chart.core and chart.basic to chart.builder