cleanup if/else

This commit is contained in:
nymkappa 2023-11-15 18:47:56 +09:00
parent dc26c6f105
commit 4cd8d70de5
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -256,13 +256,11 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges, On
],
yAxis: {
max: (value) => {
if (!this.outlierCappingEnabled) {
if (!this.outlierCappingEnabled || value.max < this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER) {
return undefined;
} else {
return Math.round(this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER);
}
if (value.max < this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER) {
return undefined;
}
return Math.round(this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER);
},
type: 'value',
axisLabel: {