Saving Chart without loading IFrame Typescript

Hi,

I am wondering if it is possible i can generate the radar chart and save to a png file without loading iframe, or set the section invisible in the HTML page?

Thanks


1 Reply

BP Baby Palanidurai Syncfusion Team June 3, 2019 08:40 AM UTC

Hi Qi, 

Greetings from Syncfusion. 

We have analyzed your query and we can achieve your requirement using export method. In that button click, we have export a chart into a PNG format.  

For more formation about export, kindly find the below documentation and demo link, 


Code snippet:  
<button id='export'>Export</button> 
          <div id="container"></div> 


import { Chart, RadarSeries, LineSeries, Export } from '@syncfusion/ej2-charts'; 
Chart.Inject(LineSeries, RadarSeries, Export) 

let chart: Chart = new Chart({ 
  // 
}); 
chart.appendTo('#container'); 

document.getElementById('export').onclick = function() { 
   chart.exportModule.export('PNG', 'chart'); 


Kindly revert us, if you need further assistance. We are always happy in assisting you. 

Regards, 
Baby. 


Loader.
Up arrow icon