From 4349a53f2a26428b0f0a66590a7e604098234525 Mon Sep 17 00:00:00 2001 From: Peter Pisljar Date: Wed, 12 Jul 2017 17:15:52 +0200 Subject: [PATCH] fixing split chart class names and margins (#12663) --- .../lib/layout/splits/column_chart/chart_split.js | 14 +++++++++----- src/ui/public/vislib/styles/_layout.less | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ui/public/vislib/lib/layout/splits/column_chart/chart_split.js b/src/ui/public/vislib/lib/layout/splits/column_chart/chart_split.js index 060ccfdec57842..433f8670f59fed 100644 --- a/src/ui/public/vislib/lib/layout/splits/column_chart/chart_split.js +++ b/src/ui/public/vislib/lib/layout/splits/column_chart/chart_split.js @@ -43,11 +43,15 @@ export function VislibLibLayoutSplitsColumnChartChartSplitProvider() { .append('div') .attr('class', function (d, i) { let fullDivClass = divClass; - if (chartsNumber > 1) { - if (i === 0) { - fullDivClass += ' chart-first'; - } else if (i === chartsNumber - 1) { - fullDivClass += ' chart-last'; + if (fullDivClass !== 'chart') { + if (chartsNumber > 1) { + if (i === 0) { + fullDivClass += ' chart-first'; + } else if (i === chartsNumber - 1) { + fullDivClass += ' chart-last'; + } + } else { + fullDivClass += ' chart-first chart-last'; } } return fullDivClass; diff --git a/src/ui/public/vislib/styles/_layout.less b/src/ui/public/vislib/styles/_layout.less index 88c16967ed4422..4353f3f000872b 100644 --- a/src/ui/public/vislib/styles/_layout.less +++ b/src/ui/public/vislib/styles/_layout.less @@ -94,7 +94,7 @@ display: flex; flex: 1 0 0px; overflow: visible; - margin: 0; + margin: 5px; min-height: 0; min-width: 0; }