Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Merge event instead of overlapping on zooming in? #1643

Closed
ryanarnell opened this issue Feb 10, 2016 · 2 comments
Closed

Merge event instead of overlapping on zooming in? #1643

ryanarnell opened this issue Feb 10, 2016 · 2 comments

Comments

@ryanarnell
Copy link

Hi
Great library and thanks for making it available.
We are trying to merge event together when they overlap (when occurred in short interval or if user zoomed out) and display the number of the events merged.

I am sure there is a way to do this. Can anyone point me to right direction? Thanks in advance.

@ryanarnell ryanarnell changed the title Merge event instead of overlapping on zooming in? Merge event instead of overlapping on zooming in? Timeline Feb 10, 2016
@ryanarnell ryanarnell changed the title Merge event instead of overlapping on zooming in? Timeline Merge event instead of overlapping on zooming in? Feb 10, 2016
@josdejong
Copy link
Contributor

This sounds like you want to do clustering, this feature is not yet available in Timeline but for example Network supports it.

What you can do is add a listener to rangechange events, see how large the visible window is, determine sort of a "zoom level". Depending on the "zoom level", you can replace your items with clustered items. You will have to cluster them yourselves, for example loop over your data and group all items which are closer than x milliseconds.

@ryanarnell
Copy link
Author

@josdejong Thank you for your response. Yes. I think clustering in timeline is what I was looking for. Let me try to see if I can implement your solution and also look at network.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants