Timeline get Y-Axis from server



I’m working on the 13_full_month_scale from 06_timeline on the samples, this is my first time with DHTMLX. I followed your doc to link this with PHP MySQL database without a problem. I’m able to read / update basics informations from server side.

Now I’m trying to put Y-Unit (the resources, in the sample it’s James Smith, John Williams…) in database instead of an static array. I really try to understand this section of your doc, but I don’t get it. I created “sections” table on my database, with “key” and “label”. I try to link it with scheduler.serverList(“sections”) but I can’t make it work. Here important part of the code :


var view_name = “timeline”;
name: view_name,
x_unit: “day”,
x_date: “%D
x_step: 1,
x_size: 31,
section_autoheight: false,
y_unit: sections,
y_property: “section_id”,
event_dy: “full”,

{name:“description”, height:130, map_to:“text”, type:“textarea” , focus:true},
{name:“resource”, height:23, type:“select”, options:sections, map_to:“section_id” },
{name:“time”, height:72, type:“time”, map_to:“auto”}

scheduler.init(‘scheduler_here’,new Date(),“timeline”);
var dp = new dataProcessor(“data/api.php”);


I don’t really get the philosophy here. For me “sections” has to be the same name of the table. But I don’t get how he’s mapping with the field. I don’t understand if I have to use scheduler_connector, this file isn’t in the package you sent.

Do you have an idea ?



I manage to make it work. I just didn’t understand correctly the back-end side. I success to create collections JSON, get back the data the first time and it was ok. :slight_smile: