More efficient sample counting
This commit is contained in:
		@@ -74,10 +74,12 @@ export class HomeComponent implements OnInit {
 | 
			
		||||
	countSamples(data: any) {
 | 
			
		||||
		this.keys.map(key => key.count = 0);
 | 
			
		||||
		for (var i = 0; i < data.length; i++) {
 | 
			
		||||
			this.keys.forEach(key => {
 | 
			
		||||
			this.keys.every(key => {
 | 
			
		||||
				if (key.id === data[i].material.group) {
 | 
			
		||||
					key.count += 1;
 | 
			
		||||
					key.count++;
 | 
			
		||||
					return false;
 | 
			
		||||
				}
 | 
			
		||||
				return true;
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
		this.updateGraph();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user