From 7c806b4b23b021a9e62fa26dbe1b7d0fa4c686ea Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sat, 22 Jun 2024 01:58:46 +0000 Subject: [PATCH] Always show clearing rate line on incoming tx chart --- .../incoming-transactions-graph.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts index fe2256bfd..d3d7d8237 100644 --- a/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts +++ b/frontend/src/app/components/incoming-transactions-graph/incoming-transactions-graph.component.ts @@ -249,12 +249,13 @@ export class IncomingTransactionsGraphComponent implements OnInit, OnChanges, On } ], yAxis: { - max: (value) => { - if (!this.outlierCappingEnabled || value.max < this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER) { - return undefined; - } else { - return Math.round(this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER); + max: (value): number => { + let cappedMax = value.max; + if (this.outlierCappingEnabled && value.max >= (this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER)) { + cappedMax = Math.round(this.medianVbytesPerSecond * OUTLIERS_MEDIAN_MULTIPLIER); } + // always show the clearing rate line, plus a small margin + return Math.max(1800, cappedMax); }, type: 'value', axisLabel: {