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

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

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.


1 Reply

AR Aravind Ravi Syncfusion Team 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) => { 
Aravind Ravi 

Live Chat Icon For mobile
Up arrow icon