kopia lustrzana https://github.com/miklobit/TiddlyWiki5
				
				
				
			Ensure the bar chart widget updates its view when it refreshes
							rodzic
							
								
									5445a8b782
								
							
						
					
					
						commit
						ea8556bb1f
					
				|  | @ -128,14 +128,18 @@ BarWidget.prototype.createChart = function() { | ||||||
| 		.attr("transform", "translate(0," + height + ")") | 		.attr("transform", "translate(0," + height + ")") | ||||||
| 		.call(xAxis); | 		.call(xAxis); | ||||||
| 
 | 
 | ||||||
| 	var self = this; | 	var self = this, | ||||||
| 	return function updateChart() { | 		updateChart = function() { | ||||||
| 	  if (self.grouped !== "no") { | 	  if (self.grouped !== "no") { | ||||||
| 		transitionGrouped(); | 		transitionGrouped(); | ||||||
| 	  } else { | 	  } else { | ||||||
| 		transitionStacked(); | 		transitionStacked(); | ||||||
| 	  } | 	  } | ||||||
| 	}; | 	}; | ||||||
|  | 	// Update the chart according to the grouped setting
 | ||||||
|  | 	updateChart(); | ||||||
|  | 	// Return the update function
 | ||||||
|  | 	return updateChart; | ||||||
| 
 | 
 | ||||||
| 	function transitionGrouped() { | 	function transitionGrouped() { | ||||||
| 	  y.domain([0, yGroupMax]); | 	  y.domain([0, yGroupMax]); | ||||||
|  |  | ||||||
		Ładowanie…
	
		Reference in New Issue
	
	 Jeremy Ruston
						Jeremy Ruston