Set tooltip background color to match corresponding boxplot color
Browse files
app.py
CHANGED
|
@@ -200,6 +200,7 @@ def create_boxplot_task(dataframe=None, baselines=None, references=None):
|
|
| 200 |
fillcolor=colors[i],
|
| 201 |
opacity=0.7,
|
| 202 |
hovertemplate="<b>"+task+"</b><br>Accuracy: %{y:.2f}%<extra></extra>",
|
|
|
|
| 203 |
width=0.6,
|
| 204 |
whiskerwidth=0.2,
|
| 205 |
quartilemethod="linear"
|
|
@@ -237,10 +238,6 @@ def create_boxplot_task(dataframe=None, baselines=None, references=None):
|
|
| 237 |
dragmode=False,
|
| 238 |
font=dict(family="Arial", size=10),
|
| 239 |
margin=dict(b=80),
|
| 240 |
-
hoverlabel = dict(
|
| 241 |
-
bgcolor="blue", # background color of the tooltip
|
| 242 |
-
font_color="white" # text color in the tooltip
|
| 243 |
-
)
|
| 244 |
)
|
| 245 |
|
| 246 |
# Caption
|
|
|
|
| 200 |
fillcolor=colors[i],
|
| 201 |
opacity=0.7,
|
| 202 |
hovertemplate="<b>"+task+"</b><br>Accuracy: %{y:.2f}%<extra></extra>",
|
| 203 |
+
hoverlabel=dict(bgcolor=colors[i], font_color="white"),
|
| 204 |
width=0.6,
|
| 205 |
whiskerwidth=0.2,
|
| 206 |
quartilemethod="linear"
|
|
|
|
| 238 |
dragmode=False,
|
| 239 |
font=dict(family="Arial", size=10),
|
| 240 |
margin=dict(b=80),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
)
|
| 242 |
|
| 243 |
# Caption
|