Easy way to add a new y_unit in Timeline View


Currently, new ‘sections’ are added by editing the HTML file;

var employees=[ {key:1, label:"James Smith"}, {key:2, label:"John Williams"}, {key:3, label:"David Miller"}, {key:4, label:"Linda Brown"}, {key:5, label:"Bruce Lee"}, {key:6, label:"Ninja Cat"} ];

I saw there is a way to read in options from mySQL - which I should be able to work out.

Would there be a way to ‘double-click’ on the y-axis of the timeline view, to open a simple ‘add/remove’ box?

Any thoughts on this?

There is no built in wizard for such task, but there is onYScaleDblClick event, which occurs when scale is dbl-clicked.

How do you use this?

When I try and display ‘value’;

scheduler.attachEvent("onYScaleDblClick", function (index, value, e){ alert(value) });

It just brings a message box up with
[object Object]



You must use value.label.