This is a migrated thread and some comments may be shown as answers.

tooltip sometimes cause the windows resize event

3 Answers 128 Views
Charts
This is a migrated thread and some comments may be shown as answers.
ye
Top achievements
Rank 1
ye asked on 27 Apr 2015, 02:33 AM

hi,when using the tooltip feature of the bar chart,we find sometimes(not always,according to the window initial size ) it will fires the windows resize event.

chrome is fine ,this problem only occurs in IE8

our code snippets  :

var currentHeight;
var currentWidth;

$(window).resize(function () {
var windowHeight = $(window).height();
var windowWidth = $(window).width();

if (currentHeight == undefined || currentHeight != windowHeight
|| currentWidth == undefined || currentWidth != windowWidth) {
currentHeight = windowHeight;
currentWidth = windowWidth;
kendo.resize("#ourChartDiv");  // we want to dynamically resize the chart size according to the window size
}
});

we find kendo.resize method will remove the tootip again,so we got the following exception 

in kendo.ui.js ( Kendo UI v2014.3.1119 )

          var size = {
                width: this.element.outerWidth(),
                height: this.element.outerHeight()
            };

this.element is null 

I want know how to resolve or avoid this problem ,thanks in advance !

 

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 29 Apr 2015, 07:31 AM
Hi,

Thank you for the detailed description of the problem.

The issue was a bit unclear to me from the info provided in ticket 929368.
Feel free to close the other ticket so we can keep the discussion here.

My first suggestion is to call the resize method only after e certain threshold. For example:
if (currentHeight == undefined || Math.abs(currentHeight - windowHeight) > 20)

Try different values to see if this helps. We will take care of the tooltip code to make sure it doesn't throw an error.
I hope this helps.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Hector
Top achievements
Rank 1
answered on 22 Feb 2016, 08:29 PM
I got the same problem when recreating the chart after applying some filters with the data.  The tooltip produced the same error
0
Iliana Dyankova
Telerik team
answered on 24 Feb 2016, 03:09 PM
Hi Hector,

I posted a reply in your other thread on the same subject, however here is my answe, too: 

I used this dojo and tried to reproduce the issue but to no avail (short screencast capture). Could you please modify my example and demonstrate your exact setup? Also, do you observe the problem only in IE 11 (as pointed in the ticket info) or it persits in all major browsers?

In order to avoid further duplications let's keep the discussion in only one of the threads.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
ye
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Hector
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or