Example of Print & Export in Angular TreeMap Component

undefined
Top 10 best selling smartphone brands - 2017 Samsung (+22) %Apple (+11.2) %Huawei (+10.5) %Oppo (+8.4) %Vivo (+6.6) %Xiaomi (+6.3) %LG (+3.6) %ZTE (+3.3) %Lenovo (+3.2) %
Properties
Export Type
File Name

This sample demonstrates the top 10 best-selling smartphone brands. Printing and exporting options has been enabled in this sample.

In this example, you can see how to export and print the rendered treemap. The TreeMap can be exported to JPEG, PNG, SVG, and PDF formats. Print functionality is done by print method when allowPrint is set as true. Export functionality is done by export method when allowImageExport and allowPdfExport is set as true.

Injecting Module:

To make use of the print and export support, we need to inject PrintService, PdfExportService and ImageExportService into the @NgModule.providers section.

More information on print and export can be found in this documentation section.