It is currently Sat Oct 25, 2014 11:24 am Advanced search

MouseOver errors on chart hiding

Technical support for the Highcharts Stock package

MouseOver errors on chart hiding

Postby k2xl » Sat Oct 29, 2011 8:12 pm

So I'm getting strange bug.

I have three charts to display. My tooltips show nicely on each point (showing the y value of each of the three graphs). However, if I hide one of my graphs, then I begin getting the following highstocks error:

Uncaught TypeError: Property 'onMouseOver' of object #<Object> is not a function
in the highstocks file line 6882

Here is the code if interested:
Code: Select all
// separate tooltip and general mouse events
            if (hoverSeries && hoverSeries.tracker) { // only use for line-type series with common tracker

                // get the point
                point = hoverSeries.tooltipPoints[index];

                // a new point is hovered, refresh the tooltip
                if (point && point !== hoverPoint) {

                    // trigger the events
                    point.onMouseOver();
highcharts.js:6882Uncaught TypeError: Property 'onMouseOver' of object #<Object> is not a function

                }
            }



Error happens on point.onMouseOver... says point doesn't have onMouseOver??

I'm using latest Highstocks (1.01, one that released on 10/25/11).

Any ideas?
k2xl
 
Posts: 4
Joined: Thu Oct 13, 2011 6:51 am

Re: MouseOver errors on chart hiding

Postby josephruscio » Sun Oct 30, 2011 8:08 pm

I'm receiving the same error if I call setExtremes on the chart's yAxis. Tooltips work fine after the chart is rendered, then I click a button that then calls setExtremes() ... tooltips no longer work and I see this same error in the console.
josephruscio
 
Posts: 2
Joined: Tue Oct 18, 2011 8:29 pm

Re: MouseOver errors on chart hiding

Postby josephruscio » Sun Oct 30, 2011 10:19 pm

If rather than using setExtremes() I just directly set chart.yAxis[0].options.min/max ... this doesn't happen. Looks like setExtremes() sets userMin/Max, which I assume is then accessed when the series is actually rendered. Something in that code path must be affecting the Point.onMouseOver attribute.
josephruscio
 
Posts: 2
Joined: Tue Oct 18, 2011 8:29 pm

Re: MouseOver errors on chart hiding

Postby KyKyPy3 » Mon Oct 31, 2011 4:48 pm

I get the same error :( with this code:
Code: Select all
plotOptions: {
         series: {
            events: {
               legendItemClick : function(e){
                            var chart = this.chart;

                  var x_extr = chart.xAxis[0].getExtremes();
                  chart.xAxis[0].setExtremes(x_extr.min, x_extr.max);
               }
            }
         },


Does anyone has workaround?
KyKyPy3
 
Posts: 3
Joined: Mon Oct 31, 2011 2:04 pm

Re: MouseOver errors on chart hiding

Postby KyKyPy3 » Mon Oct 31, 2011 8:36 pm

Add a sample. Get error with tooltip when hide/show series by legend.
Attachments
problem.zip
Sample
(140.25 KiB) Downloaded 71 times
KyKyPy3
 
Posts: 3
Joined: Mon Oct 31, 2011 2:04 pm

Re: MouseOver errors on chart hiding

Postby torstein.honsi » Thu Nov 03, 2011 4:13 pm

Do you consider this fixed with yesterday's bugfix commit?
Torstein Hønsi
CTO, Founder
Highsoft Solutions
User avatar
torstein.honsi
Site Admin
 
Posts: 9200
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Re: MouseOver errors on chart hiding

Postby Vangi » Fri Dec 02, 2011 4:58 pm

I had the same problem but it's fixed in the testing version of Highstock. But now another bug occurs for me. When I hide/show the series from the legend (also when I zoom-in by drag and drop) some other points stays after these actions. You can try it here: http://jsfiddle.net/Vangi/F3YqY/9/
DotNet.Highcharts offers Highcharts integration with ASP.NET applications.
More at: http://dotnethighcharts.codeplex.com/
Vangi
 
Posts: 16
Joined: Fri Dec 02, 2011 4:19 pm

Re: MouseOver errors on chart hiding

Postby hfrntt » Mon Dec 05, 2011 11:14 pm

I suppose that it's related to this topic: viewtopic.php?f=12&t=13674
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: MouseOver errors on chart hiding

Postby Vangi » Tue Dec 06, 2011 10:31 am

hfrntt wrote:I suppose that it's related to this topic: viewtopic.php?f=12&t=13674


Yes, you're right Slawek. This is the same problem like my. Thank you for the link.
DotNet.Highcharts offers Highcharts integration with ASP.NET applications.
More at: http://dotnethighcharts.codeplex.com/
Vangi
 
Posts: 16
Joined: Fri Dec 02, 2011 4:19 pm

Re: MouseOver errors on chart hiding

Postby trinhthanhdung » Tue Feb 07, 2012 10:08 am

Hi, maybe bug come back with HighStock ver 1.1.3
Please see my code http://jsfiddle.net/boykocodon/VhyQc/9/
I zoom manual, and then click button Set.
Nothing happen, so function setExtremes not work correctly.
Please help me, thanks!
trinhthanhdung
 
Posts: 118
Joined: Fri Jul 15, 2011 9:59 am

Re: MouseOver errors on chart hiding

Postby hoangnv » Wed Feb 08, 2012 6:01 am

We had the same problem here. This error occurs after we update HighStock 1.1.3
hoangnv
 
Posts: 8
Joined: Mon Jul 11, 2011 6:41 am

Re: MouseOver errors on chart hiding

Postby hfrntt » Fri Feb 10, 2012 3:52 pm

I don't see any problem in your fiddle "set" button works exactly as you defined, it set extremes to the same as visible. Here you can find updated example: http://highcharts.com/jsbin/anaqiy/edit
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am

Re: MouseOver errors on chart hiding

Postby trinhthanhdung » Mon Feb 13, 2012 4:43 am

hfrntt wrote:I don't see any problem in your fiddle "set" button works exactly as you defined, it set extremes to the same as visible. Here you can find updated example: http://highcharts.com/jsbin/anaqiy/edit

Please check again my link http://jsfiddle.net/boykocodon/VhyQc/9/
Well, i say after zoom manual, press button "Set", not only click button "Set".
So I still see problem in my fiddle.
trinhthanhdung
 
Posts: 118
Joined: Fri Jul 15, 2011 9:59 am

Re: MouseOver errors on chart hiding

Postby hfrntt » Sat Feb 18, 2012 9:55 am

I did this. But as I check this:
Code: Select all
$("#button").click(function(){
        var ext=chart.xAxis[0].getExtremes();
        chart.xAxis[0].setExtremes(ext.min,ext.max);
    });

After button click you read current extremes (and current zoom level), then you set it as a new extremes which are the same. Now the main question is what you need to do?
Slawek Kolodziej
Highcharts support team
hfrntt
 
Posts: 6394
Joined: Mon Aug 30, 2010 10:41 am


Return to Highstock Usage

Who is online

Users browsing this forum: No registered users and 1 guest