Changed chart_formatter to produce json compatible dictionary (ie removed \n and \t).