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.
- click on chart background (it removes line)
- 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
Post a Comment