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 (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Jan 15, 2021
1 parent 2d87d6f commit 52ab338
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: [],
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([]);
});

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

1 comment on commit 52ab338

@vercel
Copy link

@vercel vercel bot commented on 52ab338 Jan 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.