Page 1 of 1

[Resolved] adjust block size to match hours it represents (at higher zoom levels)

Posted: Mon Mar 01, 2021 9:42 pm
by gregc

I understand if I zoom in it looks good, but is there any setting that will make the event width relative to the times that it represents e.g. dont show two full days below

e.g. changes this
Image

to be like this
Image


Re: adjust block size to match hours it represents (at higher zoom levels)

Posted: Mon Mar 01, 2021 10:16 pm
by mats

Not sure what you mean, width is always relative to the start/end dates (unless you use the workingTime feature), could you please elaborate?


Re: adjust block size to match hours it represents (at higher zoom levels)

Posted: Mon Mar 01, 2021 10:52 pm
by gregc

The width is correct for the date, but not accurate for the time when there is no time in the header.
Look at Andy Rieth, he is working 8pm to 3am but the first green block above looks like he is working for 48 hours.
Ideally it would be narrower (as shown above in the second picture) without having to zoom in.


Re: adjust block size to match hours it represents (at higher zoom levels)

Posted: Mon Mar 01, 2021 10:58 pm
by mats

Could you please share the data you load which yields the incorrect width? Sounds like incorrect data.


Re: adjust block size to match hours it represents (at higher zoom levels)

Posted: Mon Mar 01, 2021 11:15 pm
by gregc

Here is this persons data which is in UTC.

, {
    "id": "12524273",
    "name": "Amir Oren",
    "resourceId": "8982050",
    "startDate": "2021-03-03T01:00:00Z",
    "endDate": "2021-03-03T08:00:00Z"
}

My browser is in EST(-5hrs) so it is 8pm to 3am but you see the width just expands to fill the two whole days.
Image

Note that if I zoom in so that the times are show in the header you can see more clearly, but I dont want to have to zoom in.

Image


Re: adjust block size to match hours it represents (at higher zoom levels)

Posted: Tue Mar 02, 2021 9:55 am
by alex.l

HI gregc,

It is not reproducible in our online examples. Could you please try to reproduce it or attach a runnable test case here to make possible to debug it and find a root cause?

Also please specify a version of the Scheduler you use.

Screenshot 2021-03-02 at 15.53.58.png
Screenshot 2021-03-02 at 15.53.58.png (61.46 KiB) Viewed 596 times

All the best,
Alex


Re: adjust block size to match hours it represents (at higher zoom levels)

Posted: Tue Mar 02, 2021 1:15 pm
by gregc

Oh I see, so it was just the config I started with as a template. I just remove

    // So that shorter, intraday events show up as a block inside a day tick
    fillTicks : true,
 

and hey presto it works :-)

thanks!