bito-code-review[bot] commented on PR #39972:
URL: https://github.com/apache/superset/pull/39972#issuecomment-4408925159

   <!-- Bito Reply -->
   The flagged issue is correct—the new no-grain branch in 
getSmartDateFormatter suppresses all axis labels for timestamps with non-zero 
seconds, hiding legitimate second-level data in Gantt and BigNumber charts that 
don't pass a time grain. To resolve, restrict suppression by removing the blank 
return for non-zero seconds in no-grain contexts, reverting to the original 
baseFormatter behavior. This prevents valid labels from becoming blank while 
addressing phantom ticks through other means if needed.
   
   **superset-frontend/plugins/plugin-chart-echarts/src/utils/formatters.ts**
   ```
   export const getSmartDateFormatter = (timeGrain?: string) => {
     const baseFormatter = getTimeFormatter(SMART_DATE_ID);
   
     return new TimeFormatter({
       id: SMART_DATE_ID,
       label: baseFormatter.label,
       formatFunc: (date: Date) => {
         const normalizedDate = new Date(date);
         normalizedDate.setMilliseconds(0);
   
         if (!timeGrain) {
           return baseFormatter(normalizedDate);
         }
   
         if (timeGrain === TimeGranularity.YEAR) {
           // Set to January 1st at midnight UTC - smart formatter will show 
year
           const year = normalizedDate.getUTCFullYear();
   ```


-- 
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