From 9c75a3ee76254f52d65698411f7f708753e9f9c2 Mon Sep 17 00:00:00 2001 From: Mark Schreiber Date: Wed, 11 Sep 2024 14:47:04 -0400 Subject: [PATCH] fixes label offsets and increases the threshold at which we stop adding labels --- omics/cli/run_analyzer/timeline.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/omics/cli/run_analyzer/timeline.py b/omics/cli/run_analyzer/timeline.py index dcc1812..edecbaf 100644 --- a/omics/cli/run_analyzer/timeline.py +++ b/omics/cli/run_analyzer/timeline.py @@ -89,6 +89,7 @@ def plot_timeline(tasks, title="", time_units="min", max_duration_hrs=5, show_pl p_run = figure(width=960, height=800, sizing_mode="stretch_both", tooltips=tooltips) p_run.hbar( + # start time bar y="y", left="starting_left", right="starting_right", @@ -98,6 +99,7 @@ def plot_timeline(tasks, title="", time_units="min", max_duration_hrs=5, show_pl legend_label="starting", ) p_run.hbar( + # running time bar y="y", left="running_left", right="running_right", @@ -106,9 +108,15 @@ def plot_timeline(tasks, title="", time_units="min", max_duration_hrs=5, show_pl source=source, legend_label="running", ) - if len(data) < 50: + if len(data) < 101: + print(f"data[text_x] is {data["text_x"]}", file=sys.stderr) + print(f"data[y] is {data['y']}", file=sys.stderr) + print(f"data[name] is {data['name']}", file=sys.stderr) p_run.text( - x="text_x", + # task name label + color="black", + x="running_right", + x_offset=10, y="y", text="name", alpha=0.4,