Home Forums StockChart Support Not unsibscribing from events

Not unsibscribing from events

Viewing 3 posts - 1 through 3 (of 3 total)
  • #44177

    Every time render is called it adds event listeners for multiple events including “mosemove”, “mosedown” and others.
    If you end up calling render many time you end up with hundreds of duplicate handlers which do start affect performance.
    Looking at the code it does call _initialize on every render call. This looks to be not a correct behaviour.

    #44242

    @alexg00,

    Events are bound to the Stockchart only once during instantiation and not when the StockChart is re-rendered.


    Thangaraj Raman
    Team CanvasJS

    #44250

    This does not appear to be the case. _initialize in navigator.slider keeps adding events on every render.
    Also there’s an issue when you call StockChart render with different options. What I mean by different options is when actual chart option references are changing. In this case underlying charts are destroyed and recreated on every render leaking resize events.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.