fixed error exportation csv in custom graphs

This commit is contained in:
daniel 2017-08-03 13:09:41 +02:00
parent 5860d29e37
commit fb9f187287
1 changed files with 5 additions and 2 deletions

View File

@ -88,7 +88,10 @@
else if (typeof labels[index] !== 'undefined') else if (typeof labels[index] !== 'undefined')
date = labels[index]; date = labels[index];
result.data.push([date, value,dataObject.label]); var clean_label = dataObject.label;
clean_label = clean_label.replace( new RegExp("<.*?>", "g"), "");
clean_label = clean_label.replace( new RegExp(";", "g"), "");
result.data.push([date, value, clean_label]);
}); });
} }
/* [ /* [
@ -139,7 +142,7 @@
try { try {
var elements = []; var elements = [];
var custom_graph = $('input:hidden[name=custom_graph]').value; var custom_graph = $('#hidden-custom_graph').val();
if (custom_graph) { if (custom_graph) {
dataObject = retrieveDataOject(dataObjects); dataObject = retrieveDataOject(dataObjects);