Error from changing name for timeline

I am using a copy of the framework that I got from
In docs.dhtmlx.com/doku.php?id=dhtm … r:timeline, I see:

I have a working timeline. This is the code that creates it:

		scheduler.createTimelineView({
			name:    "timeline",
			x_unit:    "minute",
			x_date:    "%H:%i",
			x_step:    60,
			x_size: 8,
			x_start: 13,
			y_unit:    sections,
			y_property:    "section_id",
			dy: 30,
			section_autoheight: false,
			render: "bar"
		});

If I change this:

		scheduler.createTimelineView({
			name:    "Tutors",
			x_unit:    "minute",
			x_date:    "%H:%i",
			x_step:    60,
			x_size: 8,
			x_start: 13,
			y_unit:    sections,
			y_property:    "section_id",
			dy: 30,
			section_autoheight: false,
			render: "bar"
		});

then I get:

So, is there something else I need to do? Is there some other ivar that I need to set so that something knows the correct name of the timeline view?

This error is occurring in the code at:

scheduler._pre_render_events = function(evs, hold) { var hb = this.xy.bar_height; var h_old = this._colsS.heights; var h = this._colsS.heights = [0, 0, 0, 0, 0, 0, 0]; var data = this._els["dhx_cal_data"][0]; . . .

thanx - ray

Hello,

And have you changed name of the view you are loading in the init function (should be timeline2 now)?

Kind regards,
Ilya

Yes. That worked. I looked for it but the bit that sets the scheduler config ivars and the bit that calls the init are not next to each other in my project.

I also had changed the setting of the scheduler.locale.labels.timeline_tab value, but that is just cosmetic. It did not help.

I am trying to show two possible timelines, one for each type of person being scheduled. I will make sure I am setting the names in the init code and also in the config ivars. We’ll see. Thanx.

FYI, there are a few things still here to figure out.

I put the correct name into the scheduler.init call. Fine.

I set this up so that I have a timeline view that I show by default but there is also a tab for selecting a day, week and month calendar view. But since the timeline view is the default one, the “selected” tab indicator for the calendar_view has the timeline tab marked as selected. When I rename the view in the two places (the createTimelineView() method and the scheduler.init() call), the “selected” marker on the timeline tab is missing. The timeline is being shown, so that is correct. But none of the tabs look to be selected. If I select another and then select the timeline tab, it looks selected. But it does not look selected initially.

You need to change everywhere where you referred to the view as “timeline” to “timeline2”.

Tab:

<div class="dhx_cal_tab" name="timeline2_tab" style="right:280px;"></div>

Best regards,
Ilya