Commit ad55275d authored by Miguel Rincon's avatar Miguel Rincon

Added comment explaining nan values

parent e495db2f
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
export const makeDataSeries = (queryResults, defaultConfig) => export const makeDataSeries = (queryResults, defaultConfig) =>
queryResults queryResults
.map(result => { .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)); const data = result.values.filter(([, value]) => !Number.isNaN(value));
if (!data.length) { if (!data.length) {
return null; return null;
......
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
const values = query.result[0] ? query.result[0].values : []; const values = query.result[0] ? query.result[0].values : [];
return { return {
label: query.label, label: query.label,
// NaN values may disrupt avg., max. & min. calculations in the legend, filter them out
data: values.filter(([, value]) => !Number.isNaN(value)), 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