Spaces:
Runtime error
Runtime error
Commit ·
ee35dfd
1
Parent(s): 3132066
fix-table
Browse files- app.py +1 -1
- src/display/css_html_js.py +5 -0
app.py
CHANGED
|
@@ -162,7 +162,7 @@ def create_grouped_score_table_html(df: pd.DataFrame):
|
|
| 162 |
if len(fixed_cols) >= 1:
|
| 163 |
parts.append('<col style="width:40px">')
|
| 164 |
if len(fixed_cols) >= 2:
|
| 165 |
-
parts.append('<col style="width:
|
| 166 |
for _ in range(len(data_cols_in_order)):
|
| 167 |
parts.append('<col style="width:180px">')
|
| 168 |
parts.append("</colgroup>")
|
|
|
|
| 162 |
if len(fixed_cols) >= 1:
|
| 163 |
parts.append('<col style="width:40px">')
|
| 164 |
if len(fixed_cols) >= 2:
|
| 165 |
+
parts.append('<col style="width:220px">')
|
| 166 |
for _ in range(len(data_cols_in_order)):
|
| 167 |
parts.append('<col style="width:180px">')
|
| 168 |
parts.append("</colgroup>")
|
src/display/css_html_js.py
CHANGED
|
@@ -139,6 +139,7 @@ custom_css = """
|
|
| 139 |
|
| 140 |
.score-table {
|
| 141 |
border-collapse: collapse;
|
|
|
|
| 142 |
width: max-content;
|
| 143 |
table-layout: fixed;
|
| 144 |
}
|
|
@@ -162,6 +163,10 @@ custom_css = """
|
|
| 162 |
text-align: center;
|
| 163 |
}
|
| 164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
.score-table thead .score-cell {
|
| 166 |
white-space: normal;
|
| 167 |
overflow-wrap: break-word;
|
|
|
|
| 139 |
|
| 140 |
.score-table {
|
| 141 |
border-collapse: collapse;
|
| 142 |
+
display: inline-table;
|
| 143 |
width: max-content;
|
| 144 |
table-layout: fixed;
|
| 145 |
}
|
|
|
|
| 163 |
text-align: center;
|
| 164 |
}
|
| 165 |
|
| 166 |
+
.score-table tbody td:nth-child(n+3) {
|
| 167 |
+
text-align: center;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
.score-table thead .score-cell {
|
| 171 |
white-space: normal;
|
| 172 |
overflow-wrap: break-word;
|