Commit 4bd5c062 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

flipped series and when keys

parent 7f5ae2e8
...@@ -68,8 +68,8 @@ export default function createTimeSeries(queryData, graphWidth, graphHeight, gra ...@@ -68,8 +68,8 @@ export default function createTimeSeries(queryData, graphWidth, graphHeight, gra
.y1(d => timeSeriesScaleY(d.value)); .y1(d => timeSeriesScaleY(d.value));
const timeSeriesMetricLabel = timeSeries.metric[Object.keys(timeSeries.metric)[0]]; const timeSeriesMetricLabel = timeSeries.metric[Object.keys(timeSeries.metric)[0]];
const seriesCustomizationData = queryData.when != null && const seriesCustomizationData = queryData.series != null &&
_.findWhere(queryData.when[0].series, _.findWhere(queryData.series[0].when,
{ value: timeSeriesMetricLabel }); { value: timeSeriesMetricLabel });
if (seriesCustomizationData != null) { if (seriesCustomizationData != null) {
metricTag = seriesCustomizationData.value || timeSeriesMetricLabel; metricTag = seriesCustomizationData.value || timeSeriesMetricLabel;
......
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