From 5a65a12278179918b95d684d987523b6ae5534ae Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Thu, 7 Jul 2022 16:25:52 +0200 Subject: [PATCH] Time series panel: Fix an issue with stacks being not complete due to the incorrect data frame length (#51910) * Test failure * Fix --- public/app/plugins/panel/timeseries/utils.test.ts | 3 +++ public/app/plugins/panel/timeseries/utils.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/public/app/plugins/panel/timeseries/utils.test.ts b/public/app/plugins/panel/timeseries/utils.test.ts index 25239a24685..2eb3ca95674 100644 --- a/public/app/plugins/panel/timeseries/utils.test.ts +++ b/public/app/plugins/panel/timeseries/utils.test.ts @@ -100,6 +100,8 @@ describe('prepare timeseries graph', () => { 3, ] `); + + expect(frames![0].length).toEqual(6); }); it('will insert and convert nulls to a configure "no value" value', () => { @@ -122,5 +124,6 @@ describe('prepare timeseries graph', () => { 3, ] `); + expect(frames![0].length).toEqual(6); }); }); diff --git a/public/app/plugins/panel/timeseries/utils.ts b/public/app/plugins/panel/timeseries/utils.ts index 9d720a321ba..4ec50963908 100644 --- a/public/app/plugins/panel/timeseries/utils.ts +++ b/public/app/plugins/panel/timeseries/utils.ts @@ -104,6 +104,7 @@ export function prepareGraphableFields( if (hasTimeField && hasValueField) { frames.push({ ...frame, + length: nulledFrame.length, fields, }); }