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

   <!-- Bito Reply -->
   The flagged issue is correct. Calendar grains (like months or quarters) have 
variable durations, so using a fixed duration (like a constant number of 
milliseconds) to pin ticks can lead to misaligned labels or missing time 
periods when the underlying data does not perfectly align with that fixed 
duration.
   
   To resolve this, you should avoid pinning the interval to a fixed duration 
for calendar-based grains. Instead, you can rely on ECharts' built-in time axis 
handling, which is designed to calculate appropriate intervals for calendar 
units automatically. If you need to ensure all labels are shown, you should 
handle the interval logic by checking if the grain is a calendar type and 
adjusting the `minInterval` and `maxInterval` dynamically based on the specific 
calendar unit, rather than a static timestamp constant.
   
   Would you like me to fetch all other comments on this PR to validate them 
and implement a minimal fix for the rest?
   
   
**superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts**
   ```
   const timeGrainIntervalMs = resolvedTimeGrain
       ? (TIMEGRAIN_TO_TIMESTAMP[
           resolvedTimeGrain as keyof typeof TIMEGRAIN_TO_TIMESTAMP
         ] ?? undefined)
       : undefined;
   ```


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