Skip to content

Commit 2bf19f3

Browse files
committed
fix: close #234
1 parent eddfe6d commit 2bf19f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/rtichoke/helpers/plotly_helper_functions.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ def _xy_at_cutoff(
15731573
font_color="white",
15741574
),
15751575
hoverinfo="text",
1576-
showlegend=fixed_time_horizon == initial_fixed_time_horizon,
1576+
showlegend=rtichoke_curve_list["multiple_reference_groups"],
15771577
visible=fixed_time_horizon == initial_fixed_time_horizon,
15781578
)
15791579
)
@@ -1735,6 +1735,7 @@ def marker_values_for_cutoff(
17351735
axes_ranges=rtichoke_curve_list["axes_ranges"],
17361736
x_label=rtichoke_curve_list["x_label"],
17371737
y_label=rtichoke_curve_list["y_label"],
1738+
show_legend=rtichoke_curve_list["multiple_reference_groups"],
17381739
)
17391740

17401741
return go.Figure(
@@ -1772,7 +1773,7 @@ def _create_plotly_curve_binary(rtichoke_curve_list: dict[str, Any]) -> go.Figur
17721773
font_color="white",
17731774
),
17741775
hoverinfo="text",
1775-
showlegend=True,
1776+
showlegend=rtichoke_curve_list["multiple_reference_groups"],
17761777
)
17771778
for group in rtichoke_curve_list["reference_group_keys"]
17781779
]
@@ -1919,6 +1920,7 @@ def marker_values_for_cutoff(
19191920
axes_ranges=rtichoke_curve_list["axes_ranges"],
19201921
x_label=rtichoke_curve_list["x_label"],
19211922
y_label=rtichoke_curve_list["y_label"],
1923+
show_legend=rtichoke_curve_list["multiple_reference_groups"],
19221924
)
19231925

19241926
return go.Figure(
@@ -1933,6 +1935,7 @@ def _create_curve_layout(
19331935
axes_ranges: dict[str, list[float]] | None = None,
19341936
x_label: str | None = None,
19351937
y_label: str | None = None,
1938+
show_legend: bool = True,
19361939
) -> dict[str, Any]:
19371940
sliders = slider_dict if isinstance(slider_dict, list) else [slider_dict]
19381941

0 commit comments

Comments
 (0)