Small visual change in device/country charts

This commit is contained in:
vladimir 2017-03-31 11:51:26 +02:00
parent 2df265009c
commit 3b39f619b1

View file

@ -212,7 +212,7 @@ module.exports.statsClickedSubscribersByColumn = (campaign, linkId, request, col
} }
let data = {}; let data = {};
let dataPercent = []; let dataList = [];
let total = 0; let total = 0;
rows.forEach((row, index) => { rows.forEach((row, index) => {
@ -225,10 +225,10 @@ module.exports.statsClickedSubscribersByColumn = (campaign, linkId, request, col
}); });
Object.keys(data).forEach(key => { Object.keys(data).forEach(key => {
let name = key + ': ' + data[key]; let name = key + ': ' + data[key];
let value = parseInt(data[key] * 100 / total, 10); let value = data[key];
dataPercent.push([name, value]); dataList.push([name, data[key]]);
}); });
return callback(null, dataPercent, total); return callback(null, dataList, total);
}); });
}); });
}; };