We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Scale Diagram with Dialog

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


6 Replies

SU Sumathi Uthayakumar Syncfusion Team October 13, 2022 08:56 AM

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



Attachment: Forum178158_1d37980f.zip


MW Marco Wollschläger October 17, 2022 01:46 AM

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



SU Sumathi Uthayakumar Syncfusion Team October 18, 2022 09:13 AM

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.



RP Rajeswari Pounraj Syncfusion Team October 24, 2022 03:36 AM

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



MW Marco Wollschläger October 24, 2022 04:31 AM

Hi Rajeswari,


I responded to the support ticket this morning.


Best regards,

Marco



SU Sumathi Uthayakumar Syncfusion Team October 26, 2022 02:02 AM

Hi Marco,


Thanks for the update. We will follow up with the ticket.


Regards,

Sumathi U.


Loader.
Live Chat Icon For mobile
Up arrow icon