Show unit in the yaxis for hashrate chart
This commit is contained in:
		
							parent
							
								
									cd626a7a8e
								
							
						
					
					
						commit
						63aecb1fd5
					
				@ -116,8 +116,9 @@ export class DifficultyChartComponent implements OnInit {
 | 
			
		||||
        type: 'value',
 | 
			
		||||
        axisLabel: {
 | 
			
		||||
          formatter: (val) => {
 | 
			
		||||
            const diff = val / Math.pow(10, 12); // terra
 | 
			
		||||
            return diff.toString() + 'T';
 | 
			
		||||
            const selectedPowerOfTen: any = selectPowerOfTen(val);
 | 
			
		||||
            const diff = val / selectedPowerOfTen.divider;
 | 
			
		||||
            return `${diff} ${selectedPowerOfTen.unit}`;
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        splitLine: {
 | 
			
		||||
 | 
			
		||||
@ -106,7 +106,7 @@ export class HashrateChartComponent implements OnInit {
 | 
			
		||||
          formatter: (val) => {
 | 
			
		||||
            const selectedPowerOfTen: any = selectPowerOfTen(val);
 | 
			
		||||
            const newVal = val / selectedPowerOfTen.divider;
 | 
			
		||||
            return `${newVal} ${selectedPowerOfTen.unit}`
 | 
			
		||||
            return `${newVal} ${selectedPowerOfTen.unit}H/s`
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        splitLine: {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user