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 = {}, catPoints = {},
markers; 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 // 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 // the first aggField defines the points and the others define the line
if (series.x._hasCategories() || series.y._hasCategories()) { if (series.x._hasCategories() || series.y._hasCategories()) {

View File

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

View File

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

View File

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