First version to output the chart