superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [incubator-superset] branch master updated: Fix sticky tooltips on nvd3 vizzes
Date Fri, 01 Feb 2019 23:07:12 GMT
This is an automated email from the ASF dual-hosted git repository.

christine pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new 501340b  Fix sticky tooltips on nvd3 vizzes
     new 11bace3  Merge pull request #6805 from lyft/xtinec--fix-sticky-tooltip
501340b is described below

commit 501340b5db07d0ec1711dccf0a7e4669fde77192
Author: Christine Chambers <>
AuthorDate: Fri Feb 1 14:22:09 2019 -0800

    Fix sticky tooltips on nvd3 vizzes
    Currently, we attempt to hide the nvd3 tooltips (if any were on screen) before we draw
a new viz after rerunning a query. The hiding is done by selecting the first nvtooltip element
and setting the opacity to 0.
    This somtimes leave behind a trail of old tooltips if a tooltip is left behind by this
nvd3 bug This PR modifies the behavior of how we
clean up tooltips between rerun of queries by selecting all nvd3 tooltips and removing them
all from the DOM before redrawing nvd3 vizzes.
 superset/assets/src/visualizations/nvd3/utils.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/superset/assets/src/visualizations/nvd3/utils.js b/superset/assets/src/visualizations/nvd3/utils.js
index 715b19e..92ac3dd 100644
--- a/superset/assets/src/visualizations/nvd3/utils.js
+++ b/superset/assets/src/visualizations/nvd3/utils.js
@@ -166,9 +166,9 @@ export function generateBubbleTooltipContent({
 export function hideTooltips() {
-  const target = document.querySelector('.nvtooltip');
-  if (target) {
- = 0;
+  const targets = document.querySelectorAll('.nvtooltip');
+  if (targets.length > 0) {
+    targets.forEach(t => t.remove());

View raw message