Drawing FlexPie as a raster image

This sample illustrates how to export FlexPie as a raster image using drawImage method.

The sample uses the ability of any FlexChartBase-based control to convert itself to an raster image, so the following technique is used here:

  1. Instantiate FlexPie control.
  2. Convert it to a raster image using the control's saveImageToDataUrl method.
  3. Draw the image onto the document using drawImage method.