Hello,
I want to include a diagram as part of my dialog box. That works fine but when I resize my dialog, the diagram canvas will not resize in width accordingly. Using functions like "BringIntoCenter" therefore no longer center the diagram correctly as the canvas area did not change. I am aware of the OnResizeStop event in the dialog component that might help me trigger something though I'm not sure how to tell the diagram to rescale the canvas area in width back to the current value (width is set to 100%).
Hopefully you can help me here.
Best regards,
Marco
Hi Marco,
We have prepared a sample based on your requirements. When you set height and width in the percentage diagram, then its dimension gets with respect to its parent container. We met your requirements by adjusting the height and width of the diagram parent element. While resizing the dialog component, you get the dialog dimension value in the GetDimension method. In the OnResizeStop event, you can set the width and height of the diagram parent container based on dialog component's height and width. The diagram canvas is now resized based on width. We have shared a sample and an UG link for your reference.
UG: https://blazor.syncfusion.com/documentation/diagram/page-settings#responsive-with-parent-container
If we misunderstood your requirement, could you please share the sample or video for your requirement, it will use to provide a solution?
Regards,
Sumathi. U
Hi Sumathi,
thank you very much for your response. I implemented this as described in the link and created a div around my diagram that will set the width and height whenever the diagram resizes.
Sadly this does not solve the problem that the diagram will not have the correct width internally. When I finished resizing and wait for a rendering (so everything is up to date with the new height and width), I want to bring the diagram back to the center. However when using BringIntoCenter, it will center as if the width did not change so it will always be off center after I resized the dialog.
Best regards,
Marco
Hi Marco,
We were able to reproduce the issue with " when resizing dialog, the diagram canvas will not resize in width accordingly ". We are currently validating the issue and will provide additional information on October 21, 2022.
Regards,
Sumathi U.
Hi Marco,
We have created a new ticket under your account to follow up with this query. We suggest you to follow up with the ticket for further updates. Please login using the below link.
https://support.syncfusion.com/support
Regards,
Rajeswari
Hi Rajeswari,
I responded to the support ticket this morning.
Best regards,
Marco
Hi Marco,
Thanks for the update. We will follow up with the ticket.
Regards,
Sumathi U.