Skip to content

Commit

Permalink
feat(clusteredColumnChart): set sort and page to widgets (#5293)
Browse files Browse the repository at this point in the history
Signed-off-by: yuda <[email protected]>
  • Loading branch information
yuda110 authored Dec 22, 2024
1 parent 229c929 commit ed4a142
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {
import { isDateField } from '@/common/modules/widgets/_helpers/widget-field-helper';
import { getFormattedNumber } from '@/common/modules/widgets/_helpers/widget-helper';
import {
getWidgetLoadApiQueryDateRange,
getWidgetLoadApiQueryDateRange, getWidgetLoadApiQuerySort,
} from '@/common/modules/widgets/_helpers/widget-load-helper';
import type { DataFieldValue } from '@/common/modules/widgets/_widget-fields/data-field/type';
import type { DateFormatValue } from '@/common/modules/widgets/_widget-fields/date-format/type';
Expand Down Expand Up @@ -191,12 +191,13 @@ const fetchWidget = async (): Promise<Data|APIErrorToast|undefined> => {
state.loading = true;
const _isPrivate = props.widgetId.startsWith('private');
const _fetcher = _isPrivate ? privateWidgetFetcher : publicWidgetFetcher;
// TODO: set sort and pagination
const { status, response } = await _fetcher({
widget_id: props.widgetId,
granularity: state.granularity,
group_by: [state.xAxisField],
vars: props.dashboardVars,
sort: getWidgetLoadApiQuerySort(state.xAxisField, state.dataField),
page: { start: 0, limit: state.xAxisCount },
...getWidgetLoadApiQueryDateRange(state.granularity, dateRange.value),
});
if (status === 'succeed') {
Expand Down

0 comments on commit ed4a142

Please sign in to comment.