Our pure JavaScript Scheduler component


Post by Aniket »

Referring to the post
viewtopic.php?p=56980#p56980

I am using bryntum scheduler as angular wrapper, help/guide how to use onEventDataGenerated in angular with typescript, also suggest if there is any other way

I tried putting it in ngAfterViewInit, even setting timeRangesresources to true, but it never gets called

this.scheduler.schedulerInstance.onEventDataGenerated((renderData) => {
      console.log('render', renderData);
      const record = renderData.event;
      console.log('event', record);

  if (record.isResourceTimeRange) {
    // Get bg color from the record. Not necessarily from the timeRangeColor field.
    renderData.style = `background-color: ${record.timeRangeColor};`;
  }
});

Post by arcady »

It won't work this way for time ranges feature (it's written in the post you mention). Method onEventDataGenerated does not exist on the feature class.

Try simply defining style on the corresponding range records.
I'm looking at the time ranges code and it takes into account style defined on a range:

style  : config.style + (range.style || ''),

So if your time range records will simply have style field with "background-color: red;" string they should be red.


Post by Aniket »

I understood it doing this way and its working, but i wanted to do more manipulation base on time ranges data of color, thats why trying specifically with onEventDataGenerated


Post Reply