You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/09 00:26:58 UTC
[GitHub] [airflow] hwooson12 commented on a change in pull request #20002: Add hour and minute to time format on x-axis of all charts using nvd3.lineChart
hwooson12 commented on a change in pull request #20002:
URL: https://github.com/apache/airflow/pull/20002#discussion_r765344252
##########
File path: airflow/www/views.py
##########
@@ -136,6 +136,11 @@
PAGE_SIZE = conf.getint('webserver', 'page_size')
FILTER_TAGS_COOKIE = 'tags_filter'
FILTER_STATUS_COOKIE = 'dag_status_filter'
+LINECHART_X_AXIS_TICKFORMAT = (
+ "function (d, i) { let xLabel;"
+ "if (i === undefined) {xLabel = d3.time.format('%H:%M, %d %b %Y')(new Date(parseInt(d)));"
+ "} else {xLabel = d3.time.format('%H:%M')(new Date(parseInt(d)));} return xLabel;}"
Review comment:

Your suggestion looks pretty better than showing only the hh:mm 👍
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org