[]
        
(Showing Draft Content)

Export FlexChart

Saving charts as images for inclusion in other documents is a common requirement. Some browsers support this as a context menu option, but not all.

Chart Export

The FlexChart's saveImageToFile method makes this really easy to handle programmatically. Supported file formats include PNG, JPEG and SVG.

For example, inside a button click event.:

// save chart image to file
document.getElementById('saveButton').addEventListener('click', function(e) {
  	if (e.target instanceof HTMLButtonElement) {
    	myChart.saveImageToFile('FlexChart.png');
    }
  })