Refresh the scheduler after changing y_unit value

hi, my problem is that when i change y_unit my scheduler not refreshing, i tried to use this functions with no success(i don’t know where to put them):

http://docs.dhtmlx.com/scheduler/api__scheduler_serverlist.html
http://docs.dhtmlx.com/scheduler/api__scheduler_updatecollection.html

My code:

<html>
      <select onchange ="init()">
              <option value="1">option 1</option>
              <option value="2">option 2</option>
              <option value="3">option 3</option>
       </select>
</html>


<script>
function init() {

		scheduler.locale.labels.timeline_tab = "Timeline";
		scheduler.locale.labels.section_custom="Section";
		scheduler.config.details_on_create=true;
		scheduler.config.details_on_dblclick=true;
		scheduler.config.xml_date="%Y-%m-%d %H:%i";


 var shift = $('#working_shift').val();
 $.ajax({
            type: 'GET',
            url: "/controller",
            dataType: "json",
            data: {'qqq': qqq},
            success: function(data) {
                global_data= data;  
            },
            async:false
 });

scheduler.createTimelineView({
			section_autoheight: false,
			name:	"timeline",
			x_unit:	"minute",
			x_date:	"%H:%i",
			x_step:	30,
			x_size: 24,
			x_start: 16,
			x_length:	48,
			y_unit: global_data,
			y_property:	"section_id",
			render: "tree",
			folder_events_available: true,
			dy:60
		});

		//===============
		//Data loading
		//===============
		scheduler.config.lightbox.sections=[	
			{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
			{name:"custom", height:23, type:"timeline", options:null , map_to:"section_id" }, //type should be the same as name of the tab
			{name:"time", height:72, type:"time", map_to:"auto"}
		]
		//===============
		//Data loading
		//===============
		scheduler.config.lightbox.sections=[	
			{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
			{name:"custom", height:23, type:"timeline", options:null , map_to:"section_id" }, //type should be the same as name of the tab
			{name:"time", height:72, type:"time", map_to:"auto"}
		]
		
		scheduler.init('scheduler_here',new Date(2009,5,30),"timeline");
		scheduler.load("data/events_tree_db.php");
		
		var dp = new dataProcessor("data/events_tree_db.php");
		dp.init(scheduler);
	}
	</script>

Try to use

$.ajax({ type: 'GET', url: "/controller", dataType: "json", data: {'qqq': qqq}, success: function(data) { scheduler.matrix.timeline.y_unit = data; scheduler.callEvent("onOptionsLoad", []); }, async:false });

y_unit isn’t defined there…
Uncaught TypeError: Cannot set property ‘y_unit’ of undefined

if you think that is a problem with asynchronus request it’s not…global_data is changed before scheduler.createTimelineView(y_unit: global_data …

scheduler.matrix["timeline"].y_unit = sections; scheduler.callEvent("onOptionsLoad", []);

i tested in a simple timeline and is working, but in tree timeline is not working, maybe is a bug in dhtmlxScheduler_v40_std_130813

Sorry for inconvenience, for tree timeline, change the code like next

scheduler.matrix["timeline"].y_unit_original = sections; scheduler.callEvent("onOptionsLoad", []);

thank you, working now