Dynamic highlighting

Hi again,

Is it possible to do dynamic highlighting? I explain my case:

I’ve a database table with hundreds of “holes” identified with ID, StartDate and EndDate. On the other hand I’ve another table with people filling this holes, identified by IDPeople, StartDate, EndDate.

I accomplished to show the people “events” in a timeline scheduler, but now I need to mark all the “holes” too. The finality is to show which holes are not yet covered by people.

My idea is to highlight (docs.dhtmlx.com/scheduler/limits.html) this holes. I tried to highlight one of them with addMarkedTimespan() and it works ok, but I’ve annual calendars and there are thousands of holes.

First I wanted to do something like this:

[code]<?php foreach ($holes as $hole) { ?>
scheduler.addMarkedTimestamp(…);

<?php } ?>[/code]

But I think that with thousands of holes it can be a performance problem.

Is it possible to highlight dynamically? I mean highlight only what is showed every moment. In the timeline week view highlight the current week, and if I change the week show the new highlights, and so on.

Thx

Hi Dimass,

Your topic looks like one of my recent one. You can start by taking a look next one, which can be a point of start : viewtopic.php?f=6&t=33826&p=106248#p106248

The schedulre will render only visible markers so global number of markers is not so important.

It possible to do the next

  • attach code to onViewChange event
  • compare the old and new date to be sure that date changed
  • delete all markers
  • make ajax call to server, to get the list of markers for new set of dates
  • add new markers based on server data

In such case the scheduler will contain only markers for current view. As drawback, they will appear with some delay.

I will try the two suggestions. Thank you!