|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
import { NUMERICAL_PRECISION_THRESHOLD_4_FIGURES } from '@ghostfolio/common/config'; |
|
|
import { DATE_FORMAT } from '@ghostfolio/common/helper'; |
|
|
import { DATE_FORMAT } from '@ghostfolio/common/helper'; |
|
|
import { |
|
|
import { |
|
|
AdminMarketDataDetails, |
|
|
AdminMarketDataDetails, |
|
|
@ -47,6 +48,7 @@ export class GfBenchmarkDetailDialogComponent implements OnInit { |
|
|
public assetProfile?: AdminMarketDataDetails['assetProfile']; |
|
|
public assetProfile?: AdminMarketDataDetails['assetProfile']; |
|
|
public historicalDataItems: LineChartItem[]; |
|
|
public historicalDataItems: LineChartItem[]; |
|
|
public isLoading = true; |
|
|
public isLoading = true; |
|
|
|
|
|
public precision = 2; |
|
|
public value: number; |
|
|
public value: number; |
|
|
|
|
|
|
|
|
public constructor( |
|
|
public constructor( |
|
|
@ -80,6 +82,13 @@ export class GfBenchmarkDetailDialogComponent implements OnInit { |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
this.data.deviceType === 'mobile' && |
|
|
|
|
|
this.value >= NUMERICAL_PRECISION_THRESHOLD_4_FIGURES |
|
|
|
|
|
) { |
|
|
|
|
|
this.precision = 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.isLoading = false; |
|
|
this.isLoading = false; |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|