-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long items disappear from group if data are set #1657
Open
dankop78 opened this issue
Jun 21, 2023
· 3 comments
· Fixed by SmartsquareGmbH/vis-timeline#2 · May be fixed by #1846
Open
Long items disappear from group if data are set #1657
dankop78 opened this issue
Jun 21, 2023
· 3 comments
· Fixed by SmartsquareGmbH/vis-timeline#2 · May be fixed by #1846
Comments
I have the same issue with my own page. |
Also having this issue. Any workarounds found yet? |
ChristianKrebel
added a commit
to SmartsquareGmbH/vis-timeline
that referenced
this issue
Dec 12, 2024
Remove binary search for items having an end time because items starting before range and ending after it were left out. Fixes visjs#1657
This was referenced Dec 12, 2024
ChristianKrebel
added a commit
to SmartsquareGmbH/vis-timeline
that referenced
this issue
Dec 16, 2024
Remove binary search for items having an end time because items starting before range and ending after it were left out. Fixes visjs#1657
@stappel @jdmcleod @dankop78 If you still have the need for the fix I published a fork until the fix gets merged: https://www.npmjs.com/package/@smartsquaregmbh/vis-timeline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Long range items disappear from the timeline after data update if zoomed in so that the item start before visible range and ends after visible range.
Replication
For replication use the attached StackBlitz example.
Show All
, it zooms to range where all items are visibleSet Data
, items and groups are set and displayed properlyZoom to Failure
, it zooms to range where the issue happensSet Data
, items disappear but they should be displayed as they overlap the current rangeShow All
, items are displayed again as the range has changedIf you replace step 4 by subsequent clicks on
Set Groups
andSet Items
then the items disappear at first but then they are displayed again. This is a possible workaround for us. We could executesetItems()
in timer to make the items re-appear. However it introduces unpleasant flickering :(Root Cause Analysis
The error happens in method
_updateItemsInRange
. There is a Binary Search algorithm implementation that under some combination of items simply skips the visible item. Most likely due to optimization reasons the items are at first sorted by start date and then also by end date. Then the binary search is applied that looks for first visible item by start and then by both start and end dates. If no first visible item is found then others are skipped. The proper approach would be to evaluate each item and check if it overlaps with visible range.The text was updated successfully, but these errors were encountered: