|
public exportPng() {
let exportOptions: IExportOptions = {};
exportOptions.format = "PNG";
exportOptions.mode = "Download";
exportOptions.region = "CustomBounds";
exportOptions.margin = { left: 10, right: 10, top: 10, bottom: 10 };
exportOptions.multiplePage = false;
exportOptions.fileName = "Hierarchy";
exportOptions.bounds.x = 0;
exportOptions.bounds.x = 0;
exportOptions.bounds.height = 500;
exportOptions.bounds.width = 500;
this.diagram.exportDiagram(exportOptions);
} |
|
Are there events on the diagram control that would let me know when rendering is complete? This would allow me to show a progress indicator to the user until it is done.
|
Once diagram gets created, diagram created event gets triggered. In that event you can hide the progress indicator. Please find the below code snippet for how to use created event.
| |
|
Multiple-page |
To export the diagram with multiple-page set the multiplePage as true in the export options and set page height and width as 500, 500, set region as PageSettings. So that diagram gets exported with multiple page. Please refer below code snippet
|