Repository: incubator-airflow Updated Branches: refs/heads/master 16899a95b -> 4d1466b65
[AIRFLOW-1432] Charts label for Y axis not visible The NVD3 charts did _have_ labels on the y-axis saying the unit (hours, minutes etc) but they weren't _visible_. nvd3.js correctly places labels on the xAxis, but it doesn't correctly space them on the vertical axis. Closes #2710 from ashb/AIRFLOW-1432-chart-y-axes Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/4d1466b6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/4d1466b6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/4d1466b6 Branch: refs/heads/master Commit: 4d1466b655e21b7756f22b5c2a3937811d0c65cf Parents: 16899a9 Author: Ash Berlin-Taylor <[email protected]> Authored: Sun Oct 22 19:17:43 2017 +0200 Committer: Bolke de Bruin <[email protected]> Committed: Sun Oct 22 19:17:43 2017 +0200 ---------------------------------------------------------------------- airflow/www/views.py | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/4d1466b6/airflow/www/views.py ---------------------------------------------------------------------- diff --git a/airflow/www/views.py b/airflow/www/views.py index f3c2b9c..3e34f57 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -1444,8 +1444,10 @@ class Airflow(BaseView): # update the y Axis on both charts to have the correct time units chart.create_y_axis('yAxis', format='.02f', custom_format=False, label='Duration ({})'.format(y_unit)) + chart.axislist['yAxis']['axisLabelDistance'] = '40' cum_chart.create_y_axis('yAxis', format='.02f', custom_format=False, label='Duration ({})'.format(cum_y_unit)) + cum_chart.axislist['yAxis']['axisLabelDistance'] = '40' for task in dag.tasks: if x[task.task_id]: chart.add_serie(name=task.task_id, x=x[task.task_id], @@ -1594,6 +1596,7 @@ class Airflow(BaseView): # update the y Axis to have the correct time units chart.create_y_axis('yAxis', format='.02f', custom_format=False, label='Landing Time ({})'.format(y_unit)) + chart.axislist['yAxis']['axisLabelDistance'] = '40' for task in dag.tasks: if x[task.task_id]: chart.add_serie(name=task.task_id, x=x[task.task_id],
