From d946e69eb9c7360afa1d64bce2c14a0cf8064b5a Mon Sep 17 00:00:00 2001 From: Uladzislau Lasitsa Date: Mon, 30 Aug 2021 12:55:56 +0300 Subject: [PATCH] Don't add split part of UI if we have one series (#109483) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../public/application/components/vis_with_splits.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/vis_type_timeseries/public/application/components/vis_with_splits.js b/src/plugins/vis_type_timeseries/public/application/components/vis_with_splits.js index e55c5d708e481..945a7ac986d3e 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/vis_with_splits.js +++ b/src/plugins/vis_type_timeseries/public/application/components/vis_with_splits.js @@ -40,7 +40,8 @@ export function visWithSplits(WrappedComponent) { [model, palettesService, syncColors, visData] ); - if (!model || !visData || !visData[model.id]) return ; + if (!model || !visData || !visData[model.id] || visData[model.id].series.length === 1) + return ; if (visData[model.id].series.every((s) => s.id.split(':').length === 1)) { return ; }