Home forums Using CanvasJS How to know if chart finished loading/rendering completely

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28304

    I’m trying to fire an event when the chart finishes rendering completely. The problem is when I have huge data, the chart takes a while to load but the toDataURL method captures the partially loaded chart and not the fully loaded one.

    This is how I’m converting the chart to an image:

                   var canvas             = $("#chartContainer .canvasjs-chart-canvas").get(0)
                    var dataURL            = canvas.toDataURL("image/png",1) 

    I would like to see if there is a way to know if chart has finished loading so that I can run above two lines after that.

    Thanks,
    Anil

    #28330

    @anil-t,

    Sorry, as of now we don’t have any event that is triggered after the chart is rendered. However, since CanvasJS renders millions of data in few milliseconds you can workaround by calling the required function with a delay of 2 seconds along with animationDuration of chart using the setTimeout method.

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.