New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip BUG + solve #686
Comments
From leroux.c...@gmail.com on March 03, 2012 23:47:07 I have provided a working demo of the minor bug and the differences The contents of that post are pasted below. In the example at http://people.iola.dk/olau/flot/examples/interacting.html, Also, this method causes the tooltip to flash as it is added and As you will see in the code below, my suggestion is to create a The main benefit is that this resolves the issue of the tooltip not $(document).ready(function() { position: 'absolute', display: 'none', border: '1px solid #fdd', padding: '2px', 'background-color': '#fee', opacity: 0.80 }).appendTo("body");
}); |
From mbachw...@gmail.com on March 12, 2012 13:37:37 Any ideas how to solve? |
I resubmitted an updated pull request containing the fix for this bug since the repository changed so much since it was originally submitted. |
Original author: zniki...@gmail.com (September 27, 2011 14:22:34)
Hello.
I have problem, when 2 graphs very closely and you focus on point with same dataIndex the tooltip not change!
This is my solution to fix it!
function addToolTips() {
var previousPoint = null;
$("#placeholder").bind("plothover", function (event, pos, item) {
$("#x").text(pos.x.toFixed(2));
$("#y").text(pos.y.toFixed(2));
if (item) {
if (previousPoint != item.dataIndex+item.series.label) {
previousPoint = item.dataIndex+item.series.label;
$("#tooltip").remove();
var x = makeDateForToolTip(item.datapoint[0].toFixed(2)),
y = Math.floor( item.datapoint[1].toFixed(2) ),
str = "<b>" + item.series.label + "</b> [" + y + "]<br>" + x;
showTooltip(item.pageX, item.pageY,str);
}
} else {
$("#tooltip").remove();
previousPoint = null;
}
});
}
Original issue: http://code.google.com/p/flot/issues/detail?id=607
The text was updated successfully, but these errors were encountered: