how do I refresh y-axis


#1

how do I refresh y-axis


#2

Hello,

You can update the y_axis of the timeline view, with the updateCollection method:
https://docs.dhtmlx.com/scheduler/api__scheduler_updatecollection.html

Example of usage:

var sections2=[
  {key:1, label:"Apt 1234253"},
  {key:333, label:"Apt 1234523452"},
  {key:44, label:"Apt 23145234"},
  {key:455, label:"Apt 423423452345"}
];
scheduler.createTimelineView({
...
  y_unit:	scheduler.serverList("y_sections", sections),
});


function toggleSec(){
  scheduler.updateCollection("y_sections",sections2 )
}

Here is a demo:
http://snippet.dhtmlx.com/5/17b8ae174


#3

Thanks @Siarhei, it help me to solve the issue :slight_smile: :+1: