@@ -1054,6 +1054,15 @@ def _create_plotly_curve_binary(rtichoke_curve_list: dict[str, Any]) -> go.Figur
10541054 "width" : 2 ,
10551055 "color" : rtichoke_curve_list ["colors_dictionary" ].get (group ),
10561056 },
1057+ hoverlabel = dict (
1058+ bgcolor = rtichoke_curve_list ["colors_dictionary" ].get (
1059+ group
1060+ ), # <-- background = trace color
1061+ bordercolor = rtichoke_curve_list ["colors_dictionary" ].get (
1062+ group
1063+ ), # <-- border = trace color
1064+ font_color = "white" , # <-- or "black" if your colors are light
1065+ ),
10571066 showlegend = True ,
10581067 )
10591068 for group in rtichoke_curve_list ["reference_group_keys" ]
@@ -1075,6 +1084,15 @@ def _create_plotly_curve_binary(rtichoke_curve_list: dict[str, Any]) -> go.Figur
10751084 },
10761085 name = f"{ group } @ cutoff" ,
10771086 legendgroup = group ,
1087+ hoverlabel = dict (
1088+ bgcolor = rtichoke_curve_list ["colors_dictionary" ].get (
1089+ group
1090+ ), # <-- background = trace color
1091+ bordercolor = rtichoke_curve_list ["colors_dictionary" ].get (
1092+ group
1093+ ), # <-- border = trace color
1094+ font_color = "white" , # <-- or "black" if your colors are light
1095+ ),
10781096 showlegend = False ,
10791097 hovertemplate = f"{ group } <br>x=%{{x:.4f}}<br>y=%{{y:.4f}}<extra></extra>" ,
10801098 )
@@ -1097,6 +1115,11 @@ def _create_plotly_curve_binary(rtichoke_curve_list: dict[str, Any]) -> go.Figur
10971115 color = rtichoke_curve_list ["colors_dictionary" ].get (group ),
10981116 width = 1.5 ,
10991117 ),
1118+ hoverlabel = dict (
1119+ bgcolor = rtichoke_curve_list ["colors_dictionary" ].get (group ),
1120+ bordercolor = rtichoke_curve_list ["colors_dictionary" ].get (group ),
1121+ font_color = "white" ,
1122+ ),
11001123 hoverinfo = "text" ,
11011124 text = rtichoke_curve_list ["reference_data" ]
11021125 .filter (pl .col ("reference_group" ) == group )["text" ]
@@ -1183,7 +1206,7 @@ def _create_curve_layout(
11831206 curve_layout = {
11841207 "xaxis" : {"showgrid" : False },
11851208 "yaxis" : {"showgrid" : False },
1186- "template" : "none " ,
1209+ "template" : "plotly " ,
11871210 "plot_bgcolor" : "rgba(0, 0, 0, 0)" ,
11881211 "paper_bgcolor" : "rgba(0, 0, 0, 0)" ,
11891212 "showlegend" : True ,
@@ -1198,7 +1221,7 @@ def _create_curve_layout(
11981221 },
11991222 "height" : size + 50 ,
12001223 "width" : size ,
1201- "hoverlabel" : {"bgcolor" : "rgba(0,0,0,0)" , "bordercolor" : "rgba(0,0,0,0)" },
1224+ # "hoverlabel": {"bgcolor": "rgba(0,0,0,0)", "bordercolor": "rgba(0,0,0,0)"},
12021225 "updatemenus" : [
12031226 {
12041227 "type" : "buttons" ,
0 commit comments