Print cuts off elements added after automatic layout

Hi,

I have some hierarchical workflow data that I load using an automatic layout (ComplexHierarchicalTree).  The data displays correctly, but I want to add additional connectors that loop back to the root node.  I was using either the DataLoaded or Created events to trigger adding those connectors. 

If I do it in the Created event, the connector is drawn around the left side of the current diagram and looks nice. But when I try to print, it is cut off.  If I do it in the DataLoaded event, it draws the line over other lines.

I think I'm missing how to expand or trigger the recalculation of the diagram dimensions after adding elements. I've tried DoLayout among any number of other items.  

Is there some way to get the Diagram component to recognize that it has elements outside of whatever automatic layout boundary was created and resize the boundaries so that the new connec



1 Reply

KM Kiruthika Manikandan Syncfusion Team April 15, 2024 08:49 AM UTC

Hi,

We have attempted to replicate the reported issue on our end. In the initial rendering of layouts, we create nodes and connectors, then add a connector to the root node in the CreatedEvent and perform a print action. The diagram is updated properly and the printed diagram also renders properly. We have prepared a simple sample for your reference. Could you please share a video or sample on your end? It will be helpful to reproduce the issue from our end. 


Note: If your data is protected, you can share your code snippet, sample, or video to [email protected]

Thanks,

Kiruthika M


Attachment: ComplexHierarchicalTree_42394925.zip

Loader.
Up arrow icon