Home Forums Chart Support Export Canvasjs chart + images

Export Canvasjs chart + images

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

    Hi,

    I’ve got a chart with some images on it.
    I was inspired by posts on this forum to do so.

    Now I need to export those as images. A simple ‘chart.canvas.toDataURL()’ is nice and fine BUT it does not take the images.

    Exemples:
    – found in this thread, this JsFiddle with an image . Well, when you dynamically do the ‘chart.canvas.toDataURL()’ only the graph is exported, not the images.

    – Same for this one from your docs: https://jsfiddle.net/ek75h0bd/ (I added a console.log in the resize event). do not export the images.

    This is bad news…

    Can you show me how to export the images please?
    thanks in advance

    #29693

    @xavcactus,

    Adding an image to the chart is not available as an inbuilt-feature as of now, but we do have it in our wish list. The tutorial in our documentation shows how to position an image over the chart by adding a few lines of extra code. As images are positioned on top of the chart externally, it doesn’t get exported. However, with the help of third-party libraries like html2canvas you can export chart & image together as shown in this JSFiddle.


    Shashi Ranjan
    Team CanvasJS

    #29713

    Hi @shashiranjan , good news, I will try this html2canvas for my case!
    Cheers

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

You must be logged in to reply to this topic.