Reload y_unit in timeline when clicking on cal_next_button

Hi,

how to reload y_unit via ajax in timeline when clicking on cal_next_button/prev_button,
passing the stat_date and end_date of the dates currently being viewed in the timeline?

thanks!

Hello,
please check this topic
viewtopic.php?f=25&t=38670&p=120688&hilit=reload+timeline+sections#p120688

Ok this is usefult to me:

scheduler.attachEvent(“onBeforeViewChange”, function(old_mode, old_date, mode, date) {
console.log (old_mode + " " + old_date + " " + mode + ", newDate: " + date);
return true;
});

but i’ve not understand from the docs how to set the y_unit to the newly gotten {key:… label:…}
that i’ll get via ajax from my sever.
What method i must use? Is there not an example?