diff --git a/src/plugins/vis_type_timeseries/public/application/components/_vis_with_splits.scss b/src/plugins/vis_type_timeseries/public/application/components/_vis_with_splits.scss index 36ab49c0cc807..38ef73a54b5b1 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/_vis_with_splits.scss +++ b/src/plugins/vis_type_timeseries/public/application/components/_vis_with_splits.scss @@ -23,3 +23,12 @@ min-height: $tvbSplitBlockVisMinSize / 1.25; } } + +.tvbSplitVis__split__one { + display: flex; + flex: 1 0 25%; +} + +.tvbSplitVis__one { + flex: 1; +} 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 945a7ac986d3e..77bc1a5919a29 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,8 +40,7 @@ export function visWithSplits(WrappedComponent) { [model, palettesService, syncColors, visData] ); - if (!model || !visData || !visData[model.id] || visData[model.id].series.length === 1) - return ; + if (!model || !visData || !visData[model.id]) return ; if (visData[model.id].series.every((s) => s.id.split(':').length === 1)) { return ; } @@ -105,7 +104,10 @@ export function visWithSplits(WrappedComponent) { }, }; return ( -
+
{rows}
; + return ( +
+ {rows} +
+ ); } SplitVisComponent.displayName = `SplitVisComponent(${getDisplayName(WrappedComponent)})`;