modifiedLineChart = {
const svg = d3.select(lineChart.cloneNode(true))
const line = svg.append("line")
.attr("fill", "none")
.attr("stroke", "#ccc")
.attr("stroke-width", 2)
.attr("y1", 0)
.attr("y2", height)
const circle = svg.append("circle")
.attr("fill", "red")
.attr("r", 5)
const solver = solve(svg.select("path[stroke=steelblue]").attr("d"));
return svg
.on("mousemove", move)
.call(move)
.node();
function move() {
let x = d3.event ? d3.mouse(this)[0] : width / 3;
x = x < 40 || x > width - 30 ? -10 : x
line
.attr("x1", x)
.attr("x2", x);
circle
.attr("cx", x)
.attr("cy", solver(x) || -10);
}
}