javascript - Highstock: Property 'firePointEvent' of object #<Object> is not a function -


when fire click on serie, next error : uncaught typeerror: property 'firepointevent' of object # not function.

in highstock.js v1.3.1 (2013-04-15) on line 9575 :

// series click event fireevent(hoverpoint.series, 'click', extend(e, {     point: hoverpoint })); 

until there, hoverpoint exist , have real values, don't have yet firepointevent method.

// point click event hoverpoint.firepointevent('click', e); 

on next line, hoverpoint still exist , have firepointevent method, attributes null. throws error :/

what's problem here?

i reproduce problem. can see in this fiddle.

  1. click on chart background (it removes line)
  2. then click on series (the line , trigger error)

i found workaround this, have set little timeout click event , update process won't happen in same call.

i guess update() makes hoverpoint object altered, causing firepointevent property null @ end of process.

here workaround : (in jsfiddle here )

plotoptions: {         series: {             events: {                 click: function(event) {                     var = this;                     settimeout( function(){                         that.update({                             linewidth: 1,                         });                     }, 20);                  }             }         } }, 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -