mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
fix: Contribution percentages for ECharts plugins (#28368)
This commit is contained in:
committed by
GitHub
parent
9e4ba6762f
commit
55f3b46f41
@@ -78,6 +78,10 @@ export default function buildQuery(formData: QueryFormData) {
|
||||
...ensureIsArray(groupby),
|
||||
];
|
||||
|
||||
const time_offsets = isTimeComparison(formData, baseQueryObject)
|
||||
? formData.time_compare
|
||||
: [];
|
||||
|
||||
return [
|
||||
{
|
||||
...baseQueryObject,
|
||||
@@ -87,9 +91,7 @@ export default function buildQuery(formData: QueryFormData) {
|
||||
...(isXAxisSet(formData) ? {} : { is_timeseries: true }),
|
||||
// todo: move `normalizeOrderBy to extractQueryFields`
|
||||
orderby: normalizeOrderBy(baseQueryObject).orderby,
|
||||
time_offsets: isTimeComparison(formData, baseQueryObject)
|
||||
? formData.time_compare
|
||||
: [],
|
||||
time_offsets,
|
||||
/* Note that:
|
||||
1. The resample, rolling, cum, timeCompare operators should be after pivot.
|
||||
2. the flatOperator makes multiIndex Dataframe into flat Dataframe
|
||||
@@ -100,7 +102,7 @@ export default function buildQuery(formData: QueryFormData) {
|
||||
timeCompareOperator(formData, baseQueryObject),
|
||||
resampleOperator(formData, baseQueryObject),
|
||||
renameOperator(formData, baseQueryObject),
|
||||
contributionOperator(formData, baseQueryObject),
|
||||
contributionOperator(formData, baseQueryObject, time_offsets),
|
||||
sortOperator(formData, baseQueryObject),
|
||||
flattenOperator(formData, baseQueryObject),
|
||||
// todo: move prophet before flatten
|
||||
|
||||
Reference in New Issue
Block a user