search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Overlapping sorting issues

Asked by Filippo Berlini
26 days ago.

We define 4 different values of sort field in the DayPilot.Event. Sometimes when the events are re-loaded the gantt seems to ignore these values and the overlap effect is not the one expected as you can see in the image attached.

sort field value for the events in the image attached:
blue: "1"
orange: "2"
yellow: "3"
green: "4"

Comment posted by Filippo Berlini
26 days ago.

the version of the library is 2020.2.4459

Answer posted by Dan Letecky [DayPilot]
24 days ago.

In order to apply a specific order, you need to set different sort field values for each of the overlapping events. If the sort field is set only one of them the rest will appear in random order. If you don't specify the "sortDirections" property it will use the default order which is that the event that starts first will be displayed first.

See also:
https://doc.daypilot.org/scheduler/event-sorting/

During scrolling and with progressive rendering enabled (default), the events are re-rendered as they come into the viewport and the DOM order doesn't necessarily correspond to the event order. In combination with eventStackingLineHeight = 0 it might result in an apparently random order. If this is the case, you'd have to turn off the progressive event rendering (https://api.daypilot.org/daypilot-scheduler-dynamiceventrendering/) to force the original order. Or shorten the events on the server side so they don't overlap.

New Reply
This reply is
Your name (optional):