Any FlexChartBase-based control can be converted into a raster image. Here is the technique to do so:
flexPie.saveImageToDataUrl(chart.ImageFormat.Png, (url) => {
doc.drawText('Total expenses by category:');
doc.drawImage(url);
doc.end();
});
Check out the Demo here
The same technique can be applied to the create an SVG image:
The only difference here is the drawSvg method is invoked instead of drawImage.
flexPie.saveImageToDataUrl(chart.ImageFormat.Svg, (url) => {
doc.drawText('Total expenses by category:');
doc.drawSvg(url);
doc.end();
});
Check out the Demo here
Note: You can use this technique for any of the Charts in Wijmo (not just FlexPie).