Class links.Timeline.ClusterGenerator
				
				
			
				
				
				
					
Defined in:  timeline.js.
				
			
| Constructor Attributes | Constructor Name and Description | 
|---|---|
| 
							 
								links.Timeline.ClusterGenerator(timeline)
							 
							
						 | 
					
| Method Attributes | Method Name and Description | 
|---|---|
| 
								 clear()
								 
								Clear all cached clusters and data, and initialize all variables 
							 | 
						|
| 
								
								 Clear the cached clusters 
							 | 
						|
| 
								 getClusters(scale, maxItems)
								 
								Cluster the events which are too close together 
							 | 
						|
| 
								 setData(items, options)
								 
								Set the items to be clustered. 
							 | 
						|
| 
								
								 Update the current data set: clear cache, and recalculate the clustering for
the current level 
							 | 
						
					Method Detail
				
				
					 
					
					
					
					clear()
					
					
					
						Clear all cached clusters and data, and initialize all variables
						
						
					
					
					
					
						
						
						
						
						
						
						
					
					
					
					clearCache()
					
					
					
						Clear the cached clusters
						
						
					
					
					
					
						
						
						
						
						
						
						
					
					
					{Item[]}
					getClusters(scale, maxItems)
					
					
					
						Cluster the events which are too close together
						
						
					
					
					
					
						
							- Parameters:
 - {Number} scale
 - The scale of the current window, defined as (windowWidth / (endDate - startDate))
 - maxItems
 
- Returns:
 - {Item[]} clusters
 
					
					
					setData(items, options)
					
					
					
						Set the items to be clustered.
This will clear cached clusters.
						
						
					
					
					
					
						
							- Parameters:
 - {Item[]} items
 - {Object} options Optional
 - Available options: {boolean} applyOnChangedLevel If true (default), the changed data is applied as soon the cluster level changes. If false, The changed data is applied immediately
 
					
					
					updateData()
					
					
					
						Update the current data set: clear cache, and recalculate the clustering for
the current level