Spaces:
Sleeping
Sleeping
Fix chart text visibility and tab label sizing
Browse files- Add template=plotly_dark to all Plotly figures so base text defaults to
white instead of Plotly's grey default overriding our explicit colors
- Make Gantt zoom buttons (Year/Quarter/Month/Week) visible: darker opaque
background and a readable border instead of near-invisible defaults
- CSS: inactive Gradio tab labels now use full text color (#e8e8e8) instead
of muted grey, bumped to 15px/600 weight for legibility
- CSS: add Plotly SVG text rule to keep fill bright via CSS variable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- app.py +8 -1
- views/gantt.py +3 -2
- views/heatmap.py +1 -0
- views/raci.py +1 -0
app.py
CHANGED
|
@@ -182,12 +182,19 @@ button:not(.primary) {
|
|
| 182 |
}
|
| 183 |
|
| 184 |
/* === Tabs === */
|
| 185 |
-
.tab-nav button, button[role="tab"] {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
.tab-nav button.selected, button[role="tab"][aria-selected="true"] {
|
| 187 |
color: var(--pc-green) !important;
|
| 188 |
border-color: var(--pc-green) !important;
|
| 189 |
}
|
| 190 |
|
|
|
|
|
|
|
|
|
|
| 191 |
/* === Plot containers === */
|
| 192 |
.pc-plot { min-height: 600px !important; }
|
| 193 |
|
|
|
|
| 182 |
}
|
| 183 |
|
| 184 |
/* === Tabs === */
|
| 185 |
+
.tab-nav button, button[role="tab"] {
|
| 186 |
+
color: var(--pc-text) !important;
|
| 187 |
+
font-size: 15px !important;
|
| 188 |
+
font-weight: 600 !important;
|
| 189 |
+
}
|
| 190 |
.tab-nav button.selected, button[role="tab"][aria-selected="true"] {
|
| 191 |
color: var(--pc-green) !important;
|
| 192 |
border-color: var(--pc-green) !important;
|
| 193 |
}
|
| 194 |
|
| 195 |
+
/* === Plotly SVG text — keep bright in dark mode === */
|
| 196 |
+
.js-plotly-plot .plotly text { fill: var(--pc-text) !important; }
|
| 197 |
+
|
| 198 |
/* === Plot containers === */
|
| 199 |
.pc-plot { min-height: 600px !important; }
|
| 200 |
|
views/gantt.py
CHANGED
|
@@ -236,6 +236,7 @@ def render(plan: ProjectPlan, team_colors: dict | None = None) -> go.Figure:
|
|
| 236 |
def_vals, def_texts = _year_ticks(base_date, project_end)
|
| 237 |
|
| 238 |
fig.update_layout(
|
|
|
|
| 239 |
paper_bgcolor="rgba(0,0,0,0)",
|
| 240 |
plot_bgcolor="rgba(0,0,0,0)",
|
| 241 |
font=dict(color=COLORS["silver"]),
|
|
@@ -251,8 +252,8 @@ def render(plan: ProjectPlan, team_colors: dict | None = None) -> go.Figure:
|
|
| 251 |
active=0,
|
| 252 |
x=0, xanchor="left",
|
| 253 |
y=1.12, yanchor="bottom",
|
| 254 |
-
bgcolor="rgba(
|
| 255 |
-
bordercolor=
|
| 256 |
font=dict(color=COLORS["silver"], size=13),
|
| 257 |
)],
|
| 258 |
xaxis=dict(
|
|
|
|
| 236 |
def_vals, def_texts = _year_ticks(base_date, project_end)
|
| 237 |
|
| 238 |
fig.update_layout(
|
| 239 |
+
template="plotly_dark",
|
| 240 |
paper_bgcolor="rgba(0,0,0,0)",
|
| 241 |
plot_bgcolor="rgba(0,0,0,0)",
|
| 242 |
font=dict(color=COLORS["silver"]),
|
|
|
|
| 252 |
active=0,
|
| 253 |
x=0, xanchor="left",
|
| 254 |
y=1.12, yanchor="bottom",
|
| 255 |
+
bgcolor="rgba(50,50,50,0.85)",
|
| 256 |
+
bordercolor="rgba(150,150,150,0.5)",
|
| 257 |
font=dict(color=COLORS["silver"], size=13),
|
| 258 |
)],
|
| 259 |
xaxis=dict(
|
views/heatmap.py
CHANGED
|
@@ -96,6 +96,7 @@ def render(plan: ProjectPlan) -> go.Figure:
|
|
| 96 |
))
|
| 97 |
|
| 98 |
fig.update_layout(
|
|
|
|
| 99 |
paper_bgcolor="rgba(0,0,0,0)",
|
| 100 |
plot_bgcolor="rgba(0,0,0,0)",
|
| 101 |
font=dict(color=COLORS["silver"]),
|
|
|
|
| 96 |
))
|
| 97 |
|
| 98 |
fig.update_layout(
|
| 99 |
+
template="plotly_dark",
|
| 100 |
paper_bgcolor="rgba(0,0,0,0)",
|
| 101 |
plot_bgcolor="rgba(0,0,0,0)",
|
| 102 |
font=dict(color=COLORS["silver"]),
|
views/raci.py
CHANGED
|
@@ -128,6 +128,7 @@ def render(plan: ProjectPlan) -> go.Figure:
|
|
| 128 |
)
|
| 129 |
|
| 130 |
fig.update_layout(
|
|
|
|
| 131 |
paper_bgcolor="rgba(0,0,0,0)",
|
| 132 |
plot_bgcolor="rgba(0,0,0,0)",
|
| 133 |
font=dict(color=COLORS["silver"]),
|
|
|
|
| 128 |
)
|
| 129 |
|
| 130 |
fig.update_layout(
|
| 131 |
+
template="plotly_dark",
|
| 132 |
paper_bgcolor="rgba(0,0,0,0)",
|
| 133 |
plot_bgcolor="rgba(0,0,0,0)",
|
| 134 |
font=dict(color=COLORS["silver"]),
|