Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix(plugin-chart-echarts): remove columns from formData
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Jan 15, 2021
1 parent 2d87d6f commit dcf0504
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/plugin-chart-echarts/src/BoxPlot/buildQuery.ts
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: undefined,
post_processing: [
{
operation: 'boxplot',
Expand Down
2 changes: 2 additions & 0 deletions plugins/plugin-chart-echarts/test/BoxPlot/buildQuery.test.ts
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(undefined);
});

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(undefined);
});
});

0 comments on commit dcf0504

Please sign in to comment.