zhaoyongjie commented on code in PR #21378:
URL: https://github.com/apache/superset/pull/21378#discussion_r971084059


##########
superset/common/query_context_processor.py:
##########
@@ -344,10 +354,7 @@ def processing_time_offsets(  # pylint: 
disable=too-many-locals,too-many-stateme
                 offset_metrics_df = 
offset_metrics_df.rename(columns=metrics_mapping)
 
                 # 3. set time offset for index
-                # TODO: add x-axis to QueryObject, potentially as an array for
-                #  multi-dimensional charts
-                granularity = query_object.granularity
-                index = granularity if granularity in df.columns else 
DTTM_ALIAS
+                index = (get_base_axis_labels(query_object.columns) or 
[DTTM_ALIAS])[0]

Review Comment:
   `dataframe_utils.is_datetime_series` has processed `None` value case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to