Answer the question
In order to leave comments, you need to log in
Object doesn't support property or method?
made a graph, locally everything works fine.
but when integrating into 1C, an error occurs.
for(var pointId in this.points){
var point = this.points[pointId],
sum = 0;
if(sourceDataMoney.hasOwnProperty(point.series.name) && sourceDataMoney[point.series.name].hasOwnProperty(point.x)){
sum = sourceDataMoney[point.series.name][point.x][2].formatMoney(0, '.', '') + ' руб.';
}
html += '<span style="color:' + point.color + '">' + point.series.name + ' : ' + point.y + ' заказов на ' + sum + '</span><br />';
totalCount += point.y
var totalSumArr = sum.split(' ,');
for(var i=0;i<totalSumArr.length;i++){
totalSum = totalSum + parseInt(totalSumArr[i]);
}
}
Answer the question
In order to leave comments, you need to log in
and if so?
var totalSumArr = sum.split(' ,');
replace with
var totalSumArr = (sum===0?[]:sum.split(' ,'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question