3

I'm displaying multiple charts on the screen, in a .NET MVC application, using Highcharts 3.0.1. Problem that I have is that the tool tips are not destroyed when moving from one chart to another one (or when I'm not hovering over the area with the chart data). So I ended up in having 3 tooltips displayed over the three charts that I'm displaying on the screen, even if my cursor is on another area of the screen. And also related to this, there is a java script error occurring when I exit the chart area, that says:

Unhandled exception at line 6090, column 2 in http://localhost:50204/Scripts/jquery-2.0.1.js

0x800a138f - Microsoft JScript runtime error: Invalid operand to 'in': Object expected
  • verified in IE 8, 9 and Mozilla Firefox as well. This is the code that is on the js file, at that line:

    // return a css property mapped to a potentially vendor prefixed property

    function vendorPropName( style, name ) {

    // shortcut for names that are not vendor prefixed
    if ( name in style ) {
        return name;
    }
    

    It seems that tries to use the IN operand on a string - style parameter contains the following, when the error occurs:

cursor:default;padding:0;white-space:nowrap;

Error does not appear when I turn off the tooltip, so that's why I presumed is related to the tooltip.

I did also a regression test, and moved back on Highcharts version 2.2.1. On this version, the tooltips are behaving normally, tooltip is destroyed once we are exiting the chart data area. But unfortunately I can't use this version because of other functionality that involves 3.0.1

2 Answers2

0

Set hideDelay to 0: http://api.highcharts.com/highcharts#tooltip.hideDelay

Regarding error, recreate issue on jsFiddle, please.

Paweł Fus
  • 44,795
  • 3
  • 61
  • 77
  • Sorry, setting HideDelay to zero did not work, I have the same behaviour. – Viorel Iederan Jun 12 '13 at 11:28
  • Regarding jsFiddle, since the development is done in C# .NET and chart properties are all defined in C#, I'm afraid the problem is how this charts are translated in the final product (HTML/JS, etc). And even if trying to reproduce the bug, there is no explicit option to choose Highcharts 3.0.1 with JQUERY 2.0.1. – Viorel Iederan Jun 12 '13 at 11:30
  • Maybe you are using some wrappers which doesn't support that option? http://jsfiddle.net/AnT5H/1/ - timeout is equal to 0, of course now there is animation fadeOut(), but tooltip won't stay long. – Paweł Fus Jun 12 '13 at 11:38
  • The only difference is that I have a .NET MVC project, no other wrappers. But strange thing is after referencing directly the scripts from Highcharts website, error is gone in Firefox and functionality is back, while in IE I receive now another error saying 'Highcharts' is undefined – Viorel Iederan Jun 12 '13 at 11:57
  • Update Highcharts to the latest version (3.0.2) instead of 3.0.1. Without live example, I can not help so much.. – Paweł Fus Jun 12 '13 at 12:07
  • It's kind of an example - took the column basic example, and move it to jQuery 2.0.2 - here's the link (http://jsfiddle.net/gh/get/jquery/2.0.2/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/column-basic/), and nothing is displayed in IE, but the errors: SCRIPT5: Access is denied. jquery-2.0.2.js, line 1378 character 2 SCRIPT5009: '$' is undefined _display, line 21 character 1 On the other hand, on Mozilla Firefox, this works fine. – Viorel Iederan Jun 12 '13 at 12:26
  • jsFiddle has issue with displaying in old IE, try fullscreen version: http://jsfiddle.net/e2ak2/show/ Btw, jQuery 2+ doesn't support old IE anymore. – Paweł Fus Jun 12 '13 at 12:34
  • But IE version is 9, browser mode was IE9 and document mode was IE9 standards. – Viorel Iederan Jun 12 '13 at 12:41
  • Just tested with IE v 9.0.8112.16421 and with `/show/` in URL works perfectly fine. – Paweł Fus Jun 12 '13 at 13:09
  • Downgraded to jQuery 1.5.1 and Highcharts 2.2.1 and works perfectly :) – Viorel Iederan Jun 13 '13 at 06:18
0

This error appears to be version-specific. I fixed an identical error in my system by downloading the latest version of highcharts JS, replacing the one installed by NuGet.

Sergey Kalinichenko
  • 714,442
  • 84
  • 1,110
  • 1,523