如何在Superset中彻底关闭Deck.gl tooltip?消除残留小黑块
彻底禁用Superset中Deck.gl Tooltip的解决方法
针对你遇到的隐藏.deckgl-tooltip后仍有小黑块的问题,可尝试以下方案:
方案1:定位动态类容器进行隐藏
由于Tooltip容器的类名是动态生成(如css-y3eng8),可以通过父元素或属性特征来选中并隐藏:
/* 通过父容器定位所有动态生成的Tooltip子元素 */ .deckgl-overlay-container > div[class^="css-"] { display: none !important; }
或者匹配Tooltip的内联样式特征:
/* 匹配绝对定位、无指针事件的Tooltip容器 */ div[style*="position: absolute"][style*="pointer-events: none"] { display: none !important; }
方案2:从Superset图表配置直接禁用
更彻底的方式是在图表配置中关闭Tooltip:
- 进入Deck.gl图表的编辑页面
- 在「交互」或「样式」标签下找到Tooltip相关设置
- 勾选「禁用Tooltip」选项(不同Superset版本位置可能略有差异)
方案3:全局覆盖所有Tooltip相关样式
如果上述方法无效,可强制覆盖所有Tooltip相关元素的样式:
/* 彻底隐藏所有Deck.gl Tooltip相关元素 */ .deckgl-tooltip, .deckgl-overlay-container .tooltip, div[class*="-tooltip"] { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }
内容的提问来源于stack exchange,提问作者DatamineR
相关产品推荐
相关产品推荐

