Save Chart to Image from Controller

2 posts, 0 answers
  1. Scott
    Scott avatar
    1 posts
    Member since:
    Oct 2014

    Posted 23 Jun 2015 Link to this post

    What would be the best way to:

    1) Generate a chart

    2) Convert it to an image

    3) Save that chart image to a folder on the server

    #1 is done easily enough but I have been unable to find any documentation how how I can make #2 and #3 happen and any help would be most appreciated!

  2. T. Tsonev
    T. Tsonev avatar
    2760 posts

    Posted 26 Jun 2015 Link to this post


    Please accept my apologies for the delayed response.

    You can start off by generating an image from the chart as demonstrated here.
        chart.exportImage().done(function(data) {
    In the context of the done function data would be a base-64 encoded image.

    You can proceed and save it on the server:
        chart.exportImage().done(function(data) {
                dataURI: data,
                fileName: "chart.png",
                forceProxy: true,
                proxyURL: "..."

    If the proxy handler, for example, returns a 204 NO CONTENT the file won't be saved on the client.

    I hope this helps.

    T. Tsonev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET AJAX banner
Back to Top