Page 1 of 2

Alignment of event entries

Posted: Wed Aug 24, 2022 8:38 am
by braincept

Hi there,
Is it possible to define how event entries are aligned in the calendar. We try to align the entries like: resource A the left, resource B in the middle and resource C the the right (if possible).

Currently the sorting looks like random based on datetime.

Best regards
Marvin


Re: Alignment of event entries

Posted: Wed Aug 24, 2022 11:40 am
by alex.l

Please check this example with ResourceView https://bryntum.com/examples/calendar/resourceview/
does it what you want to achieve? Calendar split by resource.


Re: Alignment of event entries

Posted: Wed Aug 24, 2022 12:01 pm
by braincept

Actually we are aware of this view. But we try to align the entries better (more clearly arranged) in the normal week_view.

best regards
Marvin


Re: Alignment of event entries

Posted: Wed Aug 24, 2022 3:42 pm
by marcio

Hey Marvin,

We currently don't support the view as you asked. If you really want that, you can write your own layout by extending FluidDayLayout or the base DayLayout. But we recommend using the resource view that Alex shared.


Re: Alignment of event entries

Posted: Thu Aug 25, 2022 2:30 pm
by dongryphon

If you could post some sample data for the events that you wanted to see in that layout, that would help clarify what you are seeing.

You are correct that the current algorithm is based on start/end time of the event and tries to minimize overlaps as they are lined up by intersecting time ranges. Not "random" so much as minimizing overlaps in order to maximize area of each event.

It is most likely not possible for the FluidDayLayout to accommodate other criteria but I cannot rule out some bug in the algorithm w/o example events that illustrate the case you are describing.


Re: Alignment of event entries

Posted: Thu Aug 25, 2022 3:44 pm
by braincept

Thanks for the feedback. I will try to organize some dataSet. In the attached screenshot, we are asking ourselves why the red event from the left side is not shown on the right side. (it looks a bit random)

But yes we understand the argument about trying to minimize overlaps.


Re: Alignment of event entries

Posted: Fri Aug 26, 2022 3:22 pm
by marcio

Hey braincept,

We'll be waiting for the dataset example to check that further. Thanks!


Re: Alignment of event entries

Posted: Tue Aug 30, 2022 4:35 pm
by braincept

Hey Márcio
Thanks for your feedback. Can you show our developers how to create such a dataset? Is there a tutorial available?

Best regards
Marvin


Re: Alignment of event entries

Posted: Tue Aug 30, 2022 4:47 pm
by marcio

Hey Marvin,

To create an example, you can check here viewtopic.php?f=1&t=772

Regarding the dataset, you can use one of Bryntum's source code examples, like examples/resourceview/data.json or any other data.json, and use that structure to match your data sample.


Re: Alignment of event entries

Posted: Fri Sep 02, 2022 8:33 am
by braincept

Thanks for your feedback. Now we created the dataset. In the following screenshot you see. There should be different columns: green, red, blue.