Momentan schaue ich in D3 Probe versuchen, es zu ändern, Tooltips https://plnkr.co/edit/stHnntCknDUs0Xw6MlQ2?p=preview hinzufügen, aber kann es nicht verwalten.Wie man D3 Tooltips hinzufügt
Ich möchte Tooltip und Zeiger auf diese die Art und Weise hinzuzufügen, wie es hier geschehen ist http://c3js.org/samples/timeseries.html
//Add tooltips
// Define the div for the tooltip
var div = d3.select("body").append("div")
.attr("class", "tooltip")
.style("opacity", 0);
// Add the scatterplot
countryEnter.selectAll("dot")
.data(data)
.enter().append("circle")
.attr("r", 5)
.attr("cx", function(d) { return x(d.date); })
.attr("cy", function(d) { return y(d.stat); })
.on("mouseover", function(d) {
div.transition()
.duration(200)
.style("opacity", .9);
div .html(formatTime(d.date) + "<br/>" + d.date)
.style("left", (d3.event.pageX) + "px")
.style("top", (d3.event.pageY - 28) + "px");
})
.on("mouseout", function(d) {
div.transition()
.duration(500)
.style("opacity", 0);
});
kippe gerade bekommen es auf dem falschen Element
habe meine Antwort Ihr Problem lösen ?? – thatOneGuy