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

fix(plugin-chart-echarts): remove columns from formData #901

Merged
merged 1 commit into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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([]);
});
});