if (chartType != null && chartType.startsWith(HIGHCHART_TEMPLATE)){
//gets the dataset object informations
Integer id = obj.getDataSetId();
IDataSet dataset = DAOFactory.getDataSetDAO().loadActiveIDataSetByID(id);
ManageDatasets mDs = new ManageDatasets();
JSONArray parsJSON = getParametersAsJSON(obj);
//converts the template from xml to json format
JSONObject template = templateUtil.getJSONTemplateFromXml( getTemplate(obj.getId().toString()), parsJSON);
//sets the response
response.setAttribute("template", template);