mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 12:59:06 +01:00
fix: metric y-range render limit for data outliers
This commit is contained in:
parent
cf91563912
commit
129e6a69b8
@ -154,11 +154,18 @@
|
|||||||
? statisticsSeries.mean.length
|
? statisticsSeries.mean.length
|
||||||
: series.reduce((n, series) => Math.max(n, series.data.length), 0)
|
: series.reduce((n, series) => Math.max(n, series.data.length), 0)
|
||||||
const maxX = longestSeries * timestep
|
const maxX = longestSeries * timestep
|
||||||
const maxY = thresholds != null
|
let maxY = null
|
||||||
? useStatsSeries
|
|
||||||
|
if (thresholds !== null) {
|
||||||
|
maxY = useStatsSeries
|
||||||
? (statisticsSeries.max.reduce((max, x) => Math.max(max, x), thresholds.normal) || thresholds.normal)
|
? (statisticsSeries.max.reduce((max, x) => Math.max(max, x), thresholds.normal) || thresholds.normal)
|
||||||
: (series.reduce((max, series) => Math.max(max, series.statistics?.max), thresholds.normal) || thresholds.normal)
|
: (series.reduce((max, series) => Math.max(max, series.statistics?.max), thresholds.normal) || thresholds.normal)
|
||||||
: null
|
|
||||||
|
if (maxY >= (10 * thresholds.normal)) { // Hard y-range render limit if outliers in series data
|
||||||
|
maxY = (10 * thresholds.normal)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const plotSeries = [{label: 'Runtime', value: (u, ts, sidx, didx) => didx == null ? null : formatTime(ts)}]
|
const plotSeries = [{label: 'Runtime', value: (u, ts, sidx, didx) => didx == null ? null : formatTime(ts)}]
|
||||||
const plotData = [new Array(longestSeries)]
|
const plotData = [new Array(longestSeries)]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user