Hi,I am using igDataChart inside a igDialog window that opens external page, so essentially the chart is inside an iframe window.My problem is with the tooltip position when hovering on the columns that are close to the right edge of the dialog.The tooltip always opens to the right so the tooltip for the right columns is being cut and is unreadable to the user.
attached are two printscreens of the chart that shows the problem.printScreen1.png - is the tooltip as it should beprintScreen2.png - is the tooltip being cut
Is there anyway to control the tooltip position - this is item tooltip for the chart
Thanks for your help
Hello Amos_silberman,
I followed the steps you suggested and was unable to reproduce the behavior you're describing. I created an igDataChart within an igDialog, however, the tooltip continued to display outside of the bounds of the dialog window. You can see this behavior in the screenshot which I have attached to this message.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using the latest version of IgniteUI 2014.1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.
Hi,Attached is a sample based on the sample you have sent me.Thanks again
Thanks Mike,
works as expected.
I changed a bit your function, so the tooltip will be left (or above) of the cursor because the way you implemented it, it was sometimes hiding the datapoint that the cursor was pointing at.
My implementation of the function :
function handleMouseMove(event) {
var tooltip = $('#2015Population_tooltip'); //'2015Population' is the series' name if (tooltip[0]) { tooltip.css({ 'white-space': 'nowrap' }); var $window = $(window); var wWidth = $window.width(); var wHeight = $window.height(); var width = tooltip.outerWidth(true); var height = tooltip.outerHeight(true); var left = tooltip.position().left; var top = tooltip.position().top;
if (width + left > wWidth) { var wlimit = event.clientX - width; tooltip.css({ left: wlimit + 'px' }); } if (height + top > wHeight) { var hlimit = event.clientY - height; tooltip.css({ top: hlimit + 'px' }); }
}
Thanks again
I have spoken with our development team and as a workaround you can attach the following event/method to the mouse move event:
// atach for mouse move event
document.onmousemove = handleMouseMove;
function handleMouseMove(event) { var tooltip = $('#2015Population_tooltip'); //'2015Population' is the series' name if (tooltip[0]) { var $window = $(window); var wWidth = $window.width(); var width = tooltip.outerWidth(true); var left = tooltip.position().left; if (width + left > wWidth) { var limit = wWidth - width; tooltip.css({ left: limit + 'px' }); } } }
var tooltip = $('#2015Population_tooltip'); //'2015Population' is the series' name
if (tooltip[0]) {
var $window = $(window);
var wWidth = $window.width();
var width = tooltip.outerWidth(true);
var left = tooltip.position().left;
if (width + left > wWidth) {
var limit = wWidth - width;
tooltip.css({ left: limit + 'px' });
I am also attaching a modified version of your sample to demonstrate this behavior.
Hello,
Is there any update on the issue? Customers are keep asking me for answers..
is there any workaround?
Hi,
Is there any update on the issue?It was not solved for new 14.2 version.
Is there any way i can override the tooltip position myself?
Jquery UI position api has the collision attribute to handle such cases
see also http://css-tricks.com/collision-detection/
Thanks
Thanks for your help Joe,
looking forward for any updates on the issue.