You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by yo...@apache.org on 2022/09/16 06:09:30 UTC
[superset] branch master updated: fix(explore): Fix generic X-axis time grain disappearing (#21484)
This is an automated email from the ASF dual-hosted git repository.
yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 324e9979fa fix(explore): Fix generic X-axis time grain disappearing (#21484)
324e9979fa is described below
commit 324e9979fa968b07d0be2628cac9119c492dc9b6
Author: Cody Leff <co...@preset.io>
AuthorDate: Fri Sep 16 02:09:17 2022 -0400
fix(explore): Fix generic X-axis time grain disappearing (#21484)
---
.../superset-ui-chart-controls/src/shared-controls/index.tsx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/index.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/index.tsx
index a8a5bea37d..03d4698620 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/index.tsx
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/index.tsx
@@ -197,8 +197,12 @@ const time_grain_sqla: SharedControlConfig<'SelectControl'> = {
if (isAdhocColumn(xAxisValue)) {
return true;
}
- if (isPhysicalColumn(xAxisValue)) {
- return !!xAxis?.options?.[xAxisValue]?.is_dttm;
+ if (isPhysicalColumn(xAxisValue) && Array.isArray(xAxis?.options)) {
+ for (let i = 0; i < xAxis.options.length; i += 1) {
+ if (xAxis.options[i].column_name === xAxisValue) {
+ return !!xAxis.options[i].is_dttm;
+ }
+ }
}
return false;
},