diff --git a/x-pack/plugins/ml/public/explorer/explorer_charts/components/explorer_chart_label/__snapshots__/explorer_chart_label.test.js.snap b/x-pack/plugins/ml/public/explorer/explorer_charts/components/explorer_chart_label/__snapshots__/explorer_chart_label.test.js.snap index 3054cc4cf3957..aed47581bfc7a 100644 --- a/x-pack/plugins/ml/public/explorer/explorer_charts/components/explorer_chart_label/__snapshots__/explorer_chart_label.test.js.snap +++ b/x-pack/plugins/ml/public/explorer/explorer_charts/components/explorer_chart_label/__snapshots__/explorer_chart_label.test.js.snap @@ -8,7 +8,9 @@ exports[`ExplorerChartLabelBadge Render the chart label in one line. 1`] = ` - high_sum(nginx.access.body_sent.bytes) over nginx.access.remote_ip (population-03) + + high_sum(nginx.access.body_sent.bytes) over nginx.access.remote_ip (population-03) +  –  @@ -64,7 +66,9 @@ exports[`ExplorerChartLabelBadge Render the chart label in two lines. 1`] = ` - high_sum(nginx.access.body_sent.bytes) over nginx.access.remote_ip (population-03) + + high_sum(nginx.access.body_sent.bytes) over nginx.access.remote_ip (population-03) +   diff --git a/x-pack/plugins/ml/public/explorer/explorer_charts/components/explorer_chart_label/explorer_chart_label.test.js b/x-pack/plugins/ml/public/explorer/explorer_charts/components/explorer_chart_label/explorer_chart_label.test.js index f0ff2b53a3c18..0a56c63248265 100644 --- a/x-pack/plugins/ml/public/explorer/explorer_charts/components/explorer_chart_label/explorer_chart_label.test.js +++ b/x-pack/plugins/ml/public/explorer/explorer_charts/components/explorer_chart_label/explorer_chart_label.test.js @@ -11,6 +11,7 @@ import React from 'react'; import { ExplorerChartLabel } from './explorer_chart_label'; +const DetectorLabel = {seriesConfig.detectorLabel}; describe('ExplorerChartLabelBadge', () => { @@ -18,7 +19,7 @@ describe('ExplorerChartLabelBadge', () => { const wrapper = shallow( { const wrapper = shallow( { // only filter for rare charts if (chartType === CHART_TYPE.EVENT_DISTRIBUTION) { - return true; + return (i < categoryLimit || d.key === highlight); } - return (i < categoryLimit || d.key === highlight); + return true; }) .map(d => d.key);