I am having a rectangle which is d3 element, I want to click on that rect and a popup should come which will be having checkbox. On click of that checkbox a function should be called.
As of now when I call a function in the html, that particular function is not invoked
mini.append("g").selectAll("miniItems")
.data(data)
.enter().append("rect")
.attr("id", "rect")
.attr("x", 200)
.attr("y", function(d,i) {return y2(i*1.2)+5;})
.attr("width", windowWidth - 700)
.attr("height", 15)
.attr("stroke", "grey")
.on("click", onClick);/*on click of d3 element this function is invoked*/
function onClick(d){
let content;
content = "<div style='background: white;width:70px; box-shadow:3px 3px 5px #797878;height:30px; padding:8%'><input type='checkbox' id='myCheck' (click)='onClaim(d.executionId)'></input>"+ "claim" + "</div>";
div.html(content)
.style("left", (d3.event.pageX) + "px")
.style("top", (d3.event.pageY) + "px")
.style("display", "block");
}
function onClaim(value){/*this function is not executed*/
console.log(value);
}
I am not getting any solution in order to invoke that function
Any help is appreciated. Thank you in advance :)
