Skip to content

Commit 07bd5c9

Browse files
committed
graphing: minor cleanup
Change-Id: Id307ae957a7319302890aa32f2dfe982b2689679
1 parent 3f18b8f commit 07bd5c9

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

cmk/gui/graphing/_artwork.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,16 +613,14 @@ def _compute_graph_v_axis(
613613
min_y=v_axis_min,
614614
max_y=v_axis_max,
615615
)
616-
label_positions = [label.position for label in labels]
617-
label_range = (
618-
min([v_axis_min, *label_positions]),
619-
max([v_axis_max, *label_positions]),
620-
)
621616
rendered_labels = [
622617
AxisTick(position=label.position, text=label.text, line_width=2) for label in labels
623618
]
624619
return YAxis(
625-
range=label_range,
620+
range=(
621+
min(v_axis_min, *(t.position for t in rendered_labels)),
622+
max(v_axis_max, *(t.position for t in rendered_labels)),
623+
),
626624
unit_label=None,
627625
labels=rendered_labels,
628626
)

0 commit comments

Comments
 (0)