score:1

Accepted answer

Assign this to a variable and call the function through variable.

MyVisulizationFuncn(){
  let th = this;
  d3.select("p").text("Thanks for your time to solve this").on("click", th.myFunciton());
}

Related Query

More Query from same tag