-
18 Sep 2012 8:53 AM #1
Chart Legend ToolTips not hiding
Chart Legend ToolTips not hiding
It appears this used to be a bug with the chart ToolTips, but I am noticing the same issue with the legend ToolTip. With the chart, the ToolTip displays and hides once you move the mouse outside of the container, however the Legend's ToolTips do not hide at all. This is the code contained inside of my class that extends Chart.
PHP Code:final Legend<T> legend = new Legend<T>();
legend.setPosition(Position.RIGHT);
legend.setItemHighlighting(true);
legend.setItemHiding(true);
final LegendToolTipConfig<T> legendConfig = new LegendToolTipConfig<T>();
legendConfig.setDismissDelay(0);
legendConfig.setHideDelay(0);
legend.addLegendItemOverHandler(new LegendItemOverHandler() {
@Override
public void onLegendItemOver(LegendItemOverEvent event) {
if(getElement() != null) {
legendConfig.setBodyHtml(getToolTipText(store, event.getIndex()));
legend.setToolTipConfig(legendConfig);
}
}
});
setLegend(legend);
-
18 Sep 2012 1:16 PM #2
-
26 Sep 2012 2:11 PM #3
Thanks, I'll move this thread to the bugs forum and file it internally.
At present, of the setters you used on the LegendToolTipConfig, the setHideDelay will have no effect, though this isn't well documented, and we may be able to fix this.
A workaround, for your consideration: Try adding a handler to the legend for the LegendItemOutHandler, and invoke Legend.getToolTip().hide() when that handler goes off. In my brief testing, this has worked:
We'll update this thread when we have a fix available.Code:legend.addLegendItemOutHandler(new LegendItemOutHandler() { @Override public void onLegendItemOut(LegendItemOutEvent event) { legend.getToolTip().hide(); } });
You found a bug! We've classified it as
EXTGWT-2459
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote