Possible Duplicate:
Javascript infamous Loop problem?
When a mousemove event is reaised the variable i
is equal to last value(In my case = 4) for ALL sectors. Where i can store value of i
?
for (var i = 0; i < pieChart.Sectors.length; i++) {
pieChart.Sectors[i].mousemove(function (event) {
var percent = (localData[i] * 100) / totalSum;
pieChart.Popup(event.clientX, event.clientY, [percent, "% всего времени\n Было сделано", localData[i], "звонков"].join(' '));
});
}