[graph] don't change yaxis scale if no outliers - save state in localstorage

This commit is contained in:
nymkappa
2023-11-15 18:46:33 +09:00
parent 2d30c0b588
commit dc26c6f105
3 changed files with 12 additions and 2 deletions

View File

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