You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2025/03/28 19:47:41 UTC
(superset) branch dont-pivot-unnecessarily created (now 7d6355ce89)
This is an automated email from the ASF dual-hosted git repository.
beto pushed a change to branch dont-pivot-unnecessarily
in repository https://gitbox.apache.org/repos/asf/superset.git
at 7d6355ce89 feat: don't pivot when we don't need to
This branch includes the following new commits:
new 7d6355ce89 feat: don't pivot when we don't need to
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: feat: don't pivot when we don't need to
Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch dont-pivot-unnecessarily
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 7d6355ce89aeb78c6e6921fe864b2cd335f34be8
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Fri Mar 28 15:47:23 2025 -0400
feat: don't pivot when we don't need to
---
.../packages/superset-ui-chart-controls/src/operators/pivotOperator.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/operators/pivotOperator.ts b/superset-frontend/packages/superset-ui-chart-controls/src/operators/pivotOperator.ts
index 2b8a2bd2f0..db29a358c7 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/operators/pivotOperator.ts
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/operators/pivotOperator.ts
@@ -37,7 +37,8 @@ export const pivotOperator: PostProcessingFactory<PostProcessingPivot> = (
const xAxisLabel = getXAxisLabel(formData);
const columns = queryObject.series_columns || queryObject.columns;
- if (xAxisLabel && metricLabels.length) {
+ // Only pivot if we have an x-axis and at least one metric and column
+ if (xAxisLabel && metricLabels.length && columns?.length) {
return {
operation: 'pivot',
options: {