Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
How can I export chart & legend together to image using igDataChart("exportImage")
posted

Hi,

I want to export chart to image including legend. I used the following code, but the exported image has the following limitations.

1) It does not include legend

2) The background of the chart is not reflected in the image. It appears transparent.

Code I used is below.

var pngImage = null;     

if (document.getElementById("chart1")) {

      pngImage = $("#chart1").igDataChart("exportImage");

      //pngImage = $("#chart1").igDataChart("exportImage", 200, 100);     

//This is to view the exported image in browser

var pngImageSrc = pngImage.src;     

document.getElementById("exportedImage").src = pngImageSrc;

 

I have attached modified file from the sample available in IgniteUI_20122_WithSamplesAndHelp_NoInstallerTrial.zip. Screen shot of original & exported image also attached.

Please let me know how to overcome these limitations.

 

Thanks

Muhammed

 

Chart_Export.zip
Parents
No Data
Reply
  • 365
    posted

    Muhammed I have the same problem.  Forgive me for posting a reply that hasn't got a full answer.  Here is how one can append canvas's together.  http://jsfiddle.net/5b8NH/

     

    I am trying to use this to just plain old create a canvas with the descriptive information I need to the chart image and then use this new canvas for my image.  It seems logical, but I have to learn how to do it in javascript.

Children