Nilesh Patel

Nilesh Patel

  • NA
  • 304
  • 7.8k

find correct location of active index

Nov 28 2017 4:14 AM
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)