Skip to content

Commit

Permalink
fix(plugin-chart-echarts): remove columns from formData (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro authored and zhaoyongjie committed Nov 26, 2021
1 parent c9e5d68 commit 1e8cb81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default function buildQuery(formData: BoxPlotQueryFormData) {
...baseQueryObject,
is_timeseries: distributionColumns.length === 0,
groupby: (groupby || []).concat(distributionColumns),
columns: [],
post_processing: [
{
operation: 'boxplot',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ describe('BoxPlot buildQuery', () => {
expect(query.is_timeseries).toEqual(true);
expect(query.metrics).toEqual(['foo']);
expect(query.groupby).toEqual(['bar']);
expect(query.columns).toEqual([]);
});

it('should build non-timeseries query object when columns is defined', () => {
Expand All @@ -46,5 +47,6 @@ describe('BoxPlot buildQuery', () => {
expect(query.is_timeseries).toEqual(false);
expect(query.metrics).toEqual(['foo']);
expect(query.groupby).toEqual(['bar', 'qwerty']);
expect(query.columns).toEqual([]);
});
});

0 comments on commit 1e8cb81

Please sign in to comment.