Commit 1aeb21f9 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch '34955-document-why-the-nan-values-are-excluded-from-monitor-charts' into 'master'

Document why the `NaN` values are excluded from monitor charts.

Closes #34955

See merge request gitlab-org/gitlab!20347
parents 3e9050c7 ad55275d
......@@ -7,6 +7,7 @@
export const makeDataSeries = (queryResults, defaultConfig) =>
queryResults
.map(result => {
// NaN values may disrupt avg., max. & min. calculations in the legend, filter them out
const data = result.values.filter(([, value]) => !Number.isNaN(value));
if (!data.length) {
return null;
......
......@@ -66,6 +66,7 @@ export default {
const values = query.result[0] ? query.result[0].values : [];
return {
label: query.label,
// NaN values may disrupt avg., max. & min. calculations in the legend, filter them out
data: values.filter(([, value]) => !Number.isNaN(value)),
};
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment