如何将垂直线附加到图表并在工具提示上显示关注的数据?
像这样的东西:

任务:
代码:
/* Retrieve the node of the div element declared within the index.html by its identifier */
var visContainerNode = d3.select("#vis-container");
// Specify margins such that the visualization is clearly visible and no elements are invisible due to the svg border
var margins = {
top: 20,
right: 25,
bottom: 20,
left: 50
};
// Specify the width and height of the svg as well as the width height of the …Run Code Online (Sandbox Code Playgroud) d3.js ×1