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
Hello Amos,
Thank you very much for your patience. I have asked some of our team leads to look at this issue further, and I will get back to you tomorrow when I receive more information from them.
I have investigated your issue, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 177573. The next step will be for a developer to review my investigation and confirm my findings or to offer a fix, or other resolution.
I will leave this case open and update you with any new information after the review. You can also continue to send updates to this case at any time.
You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Please let me know if you need more information.
Hello,
Is there any update on the issue? Customers are keep asking me for answers..
is there any workaround?
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' }); } } }
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' });
}
I am also attaching a modified version of your sample to demonstrate this behavior.
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 :
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