Alternative to multiple init calls

I am using the Timeline view in a web application, and have several functions throughout the code outside of the init() function that can change the data being displayed in the Scheduler.

I have been calling init again with these updates, finding that it is having a negative impact on performance and creating some other bugs as well. But, I am not clear on how else I can update the Timeline from outside of the init() function without calling it again. I have tried scheduler.setCurrentView(), but the scheduler object does not seem to exist outside of the init function. Is there perhaps a way to access this scheduler object from outside of init() so that I can use setCurrentView without calling init again?


scheduler.setCurrentView() should do the job in most cases.

When you add dhtmlxscheduler.js to your page, there is global window.scheduler object which is available everywhere.
If you create another instances of a scheduler using method from an enterprise version, their visibility only depends on how the variable is declared