Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTGWT-3255
in
4.0.0 EA.
-
Ext GWT Premium Member
Multiple tooltips in chart
Another remark:
When I quickly hover over some points of three different series, I get three tooltips:
scscreenshot120425004.png
Shouldn't a previous tooltip disappear when another appears?
(no matter if the new appearing tooltip is from the same or another series?)
Another one:
When two or more points of different series are on the same spot the appearing tooltips hide each other:
scscreenshot120425005.png
-
Sencha User
Please post only one bug in a given bug thread. Once we have a fix, we mark a ticket associated with your forum thread as "fixed" in our internal system. Your replies are liable to be missed when this happens.
I've separated out your post into a separate thread.
-
Sencha User
I'm not sure this qualifies as a bug as that is expected behavior when using multiple tool tips http://sencha.com/examples/#ExamplePlace:tooltips. However if you wanted to only display one tool tip at a time you could have one ToolTip object that you show using the showAt method inside of the series item over event.
-
Ext GWT Premium Member
I'm not sure this qualifies as a bug as that is expected behavior when using multiple tool tips
OK. I can live with that one.
But then - if multiple tool tips is the expected behaviour - I consider my second remark as a bug.
I think
- OR you can only have one tool tip at a time
- OR you can have mutiple but then they should be visible/readable simultaneously and not hide each other (since otherwise they're quite useless imo)
Right?
-
I've got a couple workarounds:
1. First option uses the same tooltip configuration for all the series, depending on the last set.
Code:
final ToolTip newToolTip = new ToolTip(null);
final LineSeries<Data> series = new LineSeries<Data>() {
{
toolTip = newToolTip;
}
};
series.setToolTipConfig(new SeriesToolTipConfig<Data>());
final LineSeries<Data> series2 = new LineSeries<Data>() {
{
toolTip = newToolTip;
}
};
// use a custom label provider if needed...
series.setToolTipConfig(new SeriesToolTipConfig<Data>());
2. Second option, creates a tooltip for each series, and hides the other tooltip on show.
Code:
tooltip1 = new ToolTip(null) {
@Override
public void showAt(int x, int y) {
super.showAt(x, y);
tooltip2.hide();
tooltip3.hide();
}
};
tooltip2 = new ToolTip(null) {
@Override
public void showAt(int x, int y) {
super.showAt(x, y);
tooltip1.hide();
tooltip3.hide();
}
};
tooltip3 = new ToolTip(null) {
@Override
public void showAt(int x, int y) {
super.showAt(x, y);
tooltip1.hide();
tooltip2.hide();
}
};
final LineSeries<Data> series = new LineSeries<Data>() {
{
toolTip = tooltip1;
}
};
// use a custom label provider if needed...
series.setToolTipConfig(new SeriesToolTipConfig<Data>());
final LineSeries<Data> series2 = new LineSeries<Data>() {
{
toolTip = tooltip2;
}
};
// use a custom label provider if needed...
series2.setToolTipConfig(new SeriesToolTipConfig<Data>());
final LineSeries<Data> series3 = new LineSeries<Data>() {
{
toolTip = tooltip3;
}
};
// use a custom label provider if needed...
series3.setToolTipConfig(new SeriesToolTipConfig<Data>());
Brandon