Skip to main content



By default, all css styles included to the page are sent to the export service when exporting a DHTMLX Diagram. As a result, the size of the request increases that can cause the request to fail.

To avoid this problem, you can reduce the size of the exported data by applying the exportStyles property.


Optional. Defines the styles that will be sent to the export service when exporting the diagram


exportStyles?: boolean;
exportStyles?: string[];

Default config

exportStyles: true


Set the exportStyles property to false to prevent all styles from being sent to the export service:

const diagram = new dhx.Diagram("diagram_container", { 
exportStyles: false

Or define a set of styles you want to be exported. For that, you need to set string values with the absolute paths to the desired styles to the exportStyles array:

const diagram = new dhx.Diagram("diagram_container", { 

You must use only absolute paths not relative ones

Change log: Added in v3.1

Related articles: Exporting Diagram

Related sample: Diagram. Export. Export styles