1
Answer

find correct location of active index

Nilesh Patel

Nilesh Patel

6y
129
1
Hello,
 
I have added new chart in my dashboard & after binding data i have set onclick event on chart aree for show Drildown details.
 
it is working fine in chorme browser but in fire for not getting correct location of index so open wrong data in drildown.
 
I have below code on _onChartAreaClick: function(event,activeSlabs)
 
{
var self = this,
activeSlab = activeSlabs[0],
slabHeight = 0;
for (var i = 0; i < activeSlabs.length; i++){
slabHeight = activeSlabs[i]._view.base - activeSlabs[i]._view.y;
var rect = new MyRect(activeSlabs[i]._view.x, activeSlabs[i]._view.y, activeSlabs[i]._view.width, slabHeight);
if (rect.contains(event.clientX + 5, event.clientY)){
activeSlab = activeSlabs[i];
break;
}
}
 
Occur due to not getting correct activeSlab
Answers (1)