pwdsudinym-ui commented on code in PR #55339:
URL: https://github.com/apache/airflow/pull/55339#discussion_r2373909559


##########
airflow-core/src/airflow/ui/src/components/DurationChart.tsx:
##########
@@ -236,6 +236,9 @@ export const DurationChart = ({
               stacked: true,
               ticks: {
                 maxTicksLimit: 3,
+                callback: (value) => {
+                  return(dayjs(value).format(getLabelFormat(entries)))
+                }

Review Comment:
   Good catch, I didn't notice that the x-axis labels were all the same.
   
   I'm not sure that this is a timezone issue.
   
   I spent some time investigating this today. It seems a little more difficult 
than I thought. If we use the callback function for ticks, the values currently 
being passed to the callback are `0, 1, 2, ...` which I think is what gives us 
the same number across the x axis.
   
   I tried to enable `type: time` with `import 
"chartjs-adapter-dayjs-4/dist/chartjs-adapter-dayjs-4.esm";` but that just 
ended up leading to the bars disappearing
   <img width="375" height="227" alt="image" 
src="https://github.com/user-attachments/assets/b316a4b4-75d1-4105-a8a4-4edead94e225";
 />



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

Reply via email to