pull/10616/head
Andrew Watkins 2017-01-26 11:21:56 -08:00
parent 34a486a7cb
commit 3d35c5bfa2
1 changed files with 2 additions and 3 deletions

View File

@ -29,9 +29,7 @@ export default function timeSeriesToDygraph(raw = [], activeQueryIndex, isInData
})); }));
// tagSet is each tag key and value for a series // tagSet is each tag key and value for a series
const tagSet = Object.keys(tags).map((tag) => { const tagSet = Object.keys(tags).map((tag) => `[${tag}=${tags[tag]}]`).sort().join('');
return `[${tag}=${tags[tag]}]`;
}).sort().join('');
rows.forEach(({vals, columns: cols, name: measurement, index: seriesIndex}) => { rows.forEach(({vals, columns: cols, name: measurement, index: seriesIndex}) => {
const [time, ...rowValues] = vals; const [time, ...rowValues] = vals;
@ -51,6 +49,7 @@ export default function timeSeriesToDygraph(raw = [], activeQueryIndex, isInData
return acc; return acc;
}, []); }, []);
// labels are a unique combination of measurement, fields, and tags that indicate a specific series on the graph legend
const labels = cells.reduce((acc, {label, seriesIndex, responseIndex}) => { const labels = cells.reduce((acc, {label, seriesIndex, responseIndex}) => {
const existingLabel = acc.find(({ const existingLabel = acc.find(({
label: findLabel, label: findLabel,