function Scatterplot_d3(data)
{
const updateText = (node) => {
let divTag = "app1";
dispatch.call("circle-clicked", null, { id: node.ID, text: node.Report, tag: divTag});
}
const svg = d3.create("svg")
.attr("viewBox", [0, 0, Dis.width, Dis.height])
svg.append("g")
.call(xAxis)
.append("text")
.text("Reports →")
.attr("x", Dis.width)
.attr("y", Dis.marginBottom - 3)
.attr("fill", "currentColor")
.attr("text-anchor", "end")
.attr("font-size", 5)
svg.append("g")
.call(yAxis)
.append("text")
.text("↑ Threat Level")
.attr("x", -Dis.marginLeft)
.attr("y", 8)
.attr("fill", "currentColor")
.attr("text-anchor", "start")
.attr("font-size", 5)
svg.append("g")
.call(grid);
svg.append("g")
.attr("stroke-width", 0.2)
.attr("stroke", "black")
.selectAll("circle")
.data(data)
.join("circle")
.attr("cx", d => xScale(d.ID))
.attr("cy", d => yScale(d.Threat_Score))
.attr("fill", d => s2ColorScale(d.Threat_Score))
.attr("r", 2.2)
.on("click", (event, d) => {
updateText(d);
})
.append('title')
.text('Threat_Score')
return svg.node();
}