mirror of
https://github.com/apache/superset.git
synced 2024-09-19 12:09:42 -04:00
fix(plugin-chart-echarts): fix incorrect groupby in buildQuery (#800)
This commit is contained in:
parent
3c7320eb10
commit
5d70fd3946
@ -40,7 +40,7 @@ export default function buildQuery(formData: QueryFormData) {
|
||||
return [
|
||||
{
|
||||
...baseQueryObject,
|
||||
groupby: formData.series,
|
||||
groupby: formData.groupby || [],
|
||||
is_timeseries: true,
|
||||
post_processing: [
|
||||
{
|
||||
|
@ -16,12 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import {
|
||||
t,
|
||||
validateNonEmpty,
|
||||
legacyValidateInteger,
|
||||
legacyValidateNumber,
|
||||
} from '@superset-ui/core';
|
||||
import { t, legacyValidateInteger, legacyValidateNumber } from '@superset-ui/core';
|
||||
import { ControlPanelConfig } from '@superset-ui/chart-controls';
|
||||
|
||||
const config: ControlPanelConfig = {
|
||||
@ -295,10 +290,6 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
},
|
||||
controlOverrides: {
|
||||
series: {
|
||||
validators: [validateNonEmpty],
|
||||
clearable: false,
|
||||
},
|
||||
row_limit: {
|
||||
default: 100,
|
||||
},
|
||||
|
@ -22,7 +22,7 @@ describe('Timeseries buildQuery', () => {
|
||||
const formData = {
|
||||
datasource: '5__table',
|
||||
granularity_sqla: 'ds',
|
||||
series: ['foo'],
|
||||
groupby: ['foo'],
|
||||
metrics: ['bar', 'baz'],
|
||||
viz_type: 'my_chart',
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ describe('EchartsTimeseries tranformProps', () => {
|
||||
datasource: '3__table',
|
||||
granularity_sqla: 'ds',
|
||||
metric: 'sum__num',
|
||||
series: ['foo', 'bar'],
|
||||
groupby: ['foo', 'bar'],
|
||||
};
|
||||
const chartProps = new ChartProps({
|
||||
formData,
|
||||
|
Loading…
Reference in New Issue
Block a user