Fix tooltip removal

master
John Kiernander 2013-07-12 09:39:12 +01:00
parent b85f0ad894
commit 2cc17515dc
4 changed files with 14 additions and 12 deletions

View File

@ -17,6 +17,10 @@
catPoints = {},
markers;
if (chart._tooltipGroup !== null && chart._tooltipGroup !== undefined) {
chart._tooltipGroup.remove();
}
// If there is a category axis we should draw a line for each aggField. Otherwise
// the first aggField defines the points and the others define the line
if (series.x._hasCategories() || series.y._hasCategories()) {

View File

@ -20,12 +20,9 @@
theseShapes = null,
className = "series" + chart.series.indexOf(series);
// Clear any hover gubbins before redrawing so the hover markers aren't left behind
chart._group.selectAll(".hoverShapes")
.transition()
.duration(duration / 4)
.style("opacity", 0)
.remove();
if (chart._tooltipGroup !== null && chart._tooltipGroup !== undefined) {
chart._tooltipGroup.remove();
}
if (series.shapes === null || series.shapes === undefined) {
theseShapes = chart._group.selectAll("." + className).data(chartData);

View File

@ -20,12 +20,9 @@
theseShapes = null,
className = "series" + chart.series.indexOf(series);
// Clear any hover gubbins before redrawing so the hover markers aren't left behind
chart._group.selectAll(".hoverShapes")
.transition()
.duration(duration / 4)
.style("opacity", 0)
.remove();
if (chart._tooltipGroup !== null && chart._tooltipGroup !== undefined) {
chart._tooltipGroup.remove();
}
if (series.shapes === null || series.shapes === undefined) {
theseShapes = chart._group.selectAll("." + className).data(chartData);

View File

@ -18,6 +18,10 @@
line,
markers;
if (chart._tooltipGroup !== null && chart._tooltipGroup !== undefined) {
chart._tooltipGroup.remove();
}
if (series.x._hasCategories() || series.y._hasCategories()) {
firstAgg = 0;
}