{
const grafico = d3.select(DOM.svg(width, height));
const datos_puntos = misdatos;
const formatoTiempo = d3.timeFormat("%Y");
const xAxis = d3
.axisBottom()
.scale(xScale)
.ticks(7)
.tickFormat(formatoTiempo);
const tip = d3tooltip()
.attr('class', 'd3-tip')
.html(function(d) {
return d.event;
return d.year;
});
grafico.call(tip);
grafico
.append("g")
.attr("transform", `treanslate(0, ${margenes.bottom})`)
.call(xAxis);
grafico
.selectAll("circle")
.data(datos_puntos)
.enter()
.append("circle")
.attr("cx", d=> xScale(d.date) )
.attr("cy", 80)
.attr("r", 10)
.attr("fill", color_fill)
.style("fill-opacity", 0.8)
.attr("stroke", color_stroke)
.style("stroke-opacity", 0.6)
.on('mouseover', tip.show)
.on(`mouseout`, tip.hide);
return grafico.node();
}