 a80426b339
			
		
	
	a80426b339
	
	
	
		
			
			Summary: Ref T13279. Makes charts incrementally more useful by allowing the server to provide labels and colors for functions.
Test Plan: {F6438872}
Reviewers: amckinley
Reviewed By: amckinley
Subscribers: yelirekim
Maniphest Tasks: T13279
Differential Revision: https://secure.phabricator.com/D20501
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			603 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			603 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /**
 | |
|  * @provides javelin-chart-function-label
 | |
|  */
 | |
| JX.install('ChartFunctionLabel', {
 | |
| 
 | |
|   construct: function(spec) {
 | |
|     this._name = spec.name;
 | |
|     this._color = spec.color;
 | |
|     this._icon = spec.icon;
 | |
|     this._fillColor = spec.fillColor;
 | |
|   },
 | |
| 
 | |
|   members: {
 | |
|     _name: null,
 | |
|     _color: null,
 | |
|     _icon: null,
 | |
|     _fillColor: null,
 | |
| 
 | |
|     getColor: function() {
 | |
|       return this._color;
 | |
|     },
 | |
| 
 | |
|     getName: function() {
 | |
|       return this._name;
 | |
|     },
 | |
| 
 | |
|     getIcon: function() {
 | |
|       return this._icon || 'fa-circle';
 | |
|     },
 | |
| 
 | |
|     getFillColor: function() {
 | |
|       return this._fillColor;
 | |
|     }
 | |
|   }
 | |
| });
 |