Crees,
When you have multiple charts in a page, there will be multiple childElement (zoom/pan buttons). So automatically clicking all childElement will solve the issue.
var parentElement = document.getElementsByClassName("canvasjs-chart-toolbar");
var childElement = document.getElementsByTagName("button");
for(var i=0;i<childElement.length;i++){
if(childElement[i].getAttribute("state") === "pan"){
childElement[i].click();
}
}
Here is updated example.