Drill Down complete function never fires

Drill down works fine, but the callback function never seems to fire. I cannot imagine what I might be doing to be causing this not to execute.

// Drill down to box from URL parameter
renderer.drillDown(userId, function() {
// Never fires!
console.log("Drill down complete");
});

Hello @rdant,

Please make sure that the userId variable is defined and available. It may look like this:

let userId = 1;

If that does not help, please share the full code you are using and briefly describe what you would like it to do.

Thank you. What I see happening here is that the chart drills down to the correct user, so drilldown seems to be working fine, but the callback never seems to execute. I thought maybe there was a known issue with that.

// if there is userId in URL, go that that user's profile
if(userId) {

// Skip initial rendering to speed up the process
renderer.config.renderInitialNode = false;

// Wait for web part loading
renderer.onInitialLoadingFinished(function(){

console.log("onInitial load...");

// Drill down to box from URL parameter
renderer.drillDown(userId, function() {
  // Callback never fires!
  console.log("Drill down complete");
});

});
}

Hello @rdant,

Thank you for all the information you have provided. I checked in with the developer about this problem, and it turns out the renderer.drillDown() method never had a callback function. The renderer.onDrilledDown() event should be used instead:

renderer.onDrilledDown(function(event, nodeData) {
  console.log("Drill down complete");
});

For some reason, this was also not described anywhere in our documentation. We will address that shortly.

OK. Thank you. .onDrilledDown works, though it can get called multiple times, so I need to check the nodeData to be sure it's the node I want to do something with.

1 Like