Hi everybody,
when i use render_table to load events and put them into my timeline view, how does it pair the results with the section on the y-axis?
Because i can’t load my events from mysql db.
Thanks
This is configured on a client side.
When you are using scheduler.createTimelineView API you are settings y_property like next
scheduler.createTimelineView({
name: "timeline",
y_unit:
[ {key:1, label:"Section A"},
{key:2, label:"Section B"},
{key:3, label:"Section C"},
{key:4, label:"Section D"} ],
y_property:"section_id",
render: "bar"
});
As result script will take the obj.section_id from the incoming data and will match it to the one of keys in y_unit array.
All that need to be done on a server side, the section_id field must be included in the render_table command
scheduler->render_table("events", "id", "start_date, end_date, text, section_id")
And, of course, you can use your own name for that field