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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

On load of diagram component how to set the diagram in canvas to be visible fit to page

Thread ID:

Created:

Updated:

Platform:

Replies:

150233 Dec 27,2019 06:47 AM UTC Dec 30,2019 05:08 AM UTC React - EJ 2 1
loading
Tags: Diagram
Sudhanshu Jain
Asked On December 27, 2019 06:47 AM UTC

Hi,
Trying to call fit to page on mount of the component but we are unable to , as the scroller is not initialized.
Could you please suggest how to view the diagram fit to page on load of the page.

Thanks,
Sudhanshu

Aravind Ravi [Syncfusion]
Replied On December 30, 2019 05:08 AM UTC

Hi Sudhanshu, 
 
Please call fitToPage method in the created event which triggers when the diagram is created. Please refer to a code example and sample below. 
 
Code example: 
created={(args) => { 
                //fitToPage 
                 diagramInstance.fitToPage(); 
              }} 
 
 
 
Regards, 
Aravind Ravi 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon