Always show clearing rate line on incoming tx chart

This commit is contained in:
Mononaut 2024-06-22 01:58:46 +00:00
parent e1e4e79b68
commit 7c806b4b23
No known key found for this signature in database
GPG key ID: A3F058E41374C04E

View file

@ -249,12 +249,13 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges, On
} }
], ],
yAxis: { yAxis: {
max: (value) => { max: (value): number => {
if (!this.outlierCappingEnabled || value.max < this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER) { let cappedMax = value.max;
return undefined; if (this.outlierCappingEnabled && value.max >= (this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER)) {
} else { cappedMax = Math.round(this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER);
return Math.round(this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER);
} }
// always show the clearing rate line, plus a small margin
return Math.max(1800, cappedMax);
}, },
type: 'value', type: 'value',
axisLabel: { axisLabel: {