Skip to content

Commit

Permalink
Restore line rendering in point series vis using percentile agg (#35649
Browse files Browse the repository at this point in the history
…) (#36684)

Restores the visualization's  line rendering when using a multi metric aggregation like percentile. Before this fix only dots were rendered
fixes #34858
  • Loading branch information
kertal authored May 20, 2019
1 parent 2ae818a commit f11d7f7
Show file tree
Hide file tree
Showing 4 changed files with 620 additions and 4 deletions.
16 changes: 16 additions & 0 deletions src/legacy/ui/public/vislib/__tests__/lib/types/point_series.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import ngMock from 'ng_mock';
import expect from '@kbn/expect';
import stackedSeries from 'fixtures/vislib/mock_data/date_histogram/_stacked_series';
import { VislibTypesPointSeries } from '../../../lib/types/point_series';
import percentileTestdata from './testdata_linechart_percentile.json';
import percentileTestdataResult from './testdata_linechart_percentile_result.json';

describe('Point Series Config Type Class Test Suite', function () {
let pointSeriesConfig;
Expand Down Expand Up @@ -123,6 +125,20 @@ describe('Point Series Config Type Class Test Suite', function () {
});
});

describe('line chart', function () {
beforeEach(function () {
const percentileDataObj = {
get: (prop) => { return data[prop] || data.data[prop] || null; },
getLabels: () => [],
data: percentileTestdata.data
};
parsedConfig = pointSeriesConfig.line(percentileTestdata.cfg, percentileDataObj);
});
it('should render a percentile line chart', function () {
expect(JSON.stringify(parsedConfig)).to.eql(JSON.stringify(percentileTestdataResult));
});
});


describe('heatmap chart', function () {
beforeEach(function () {
Expand Down
Loading

0 comments on commit f11d7f7

Please sign in to comment.