more code formatting updates
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
This commit is contained in:
committato da
Karl W. Schulz
parent
5a27189c82
commit
76873dd0c4
+51
-43
@@ -298,9 +298,11 @@ def build_table_chart(
|
||||
[
|
||||
{
|
||||
column: {
|
||||
"value": str(row["Tips"])
|
||||
if column == display_columns[0] and row["Tips"]
|
||||
else "",
|
||||
"value": (
|
||||
str(row["Tips"])
|
||||
if column == display_columns[0] and row["Tips"]
|
||||
else ""
|
||||
),
|
||||
"type": "markdown",
|
||||
}
|
||||
for column, value in row.items()
|
||||
@@ -325,52 +327,58 @@ def build_table_chart(
|
||||
# style cell
|
||||
style_cell={"maxWidth": "500px"},
|
||||
# display style
|
||||
style_header={
|
||||
"backgroundColor": "rgb(30, 30, 30)",
|
||||
"color": "white",
|
||||
"fontWeight": "bold",
|
||||
}
|
||||
if IS_DARK
|
||||
else {},
|
||||
style_data={
|
||||
"backgroundColor": "rgb(50, 50, 50)",
|
||||
"color": "white",
|
||||
"whiteSpace": "normal",
|
||||
"height": "auto",
|
||||
}
|
||||
if IS_DARK
|
||||
else {},
|
||||
style_data_conditional=[
|
||||
{"if": {"row_index": "odd"}, "backgroundColor": "rgb(60, 60, 60)"},
|
||||
style_header=(
|
||||
{
|
||||
"if": {"column_id": "PoP", "filter_query": "{PoP} > 50"},
|
||||
"backgroundColor": "#ffa90a",
|
||||
"backgroundColor": "rgb(30, 30, 30)",
|
||||
"color": "white",
|
||||
},
|
||||
"fontWeight": "bold",
|
||||
}
|
||||
if IS_DARK
|
||||
else {}
|
||||
),
|
||||
style_data=(
|
||||
{
|
||||
"if": {"column_id": "PoP", "filter_query": "{PoP} > 80"},
|
||||
"backgroundColor": "#ff120a",
|
||||
"backgroundColor": "rgb(50, 50, 50)",
|
||||
"color": "white",
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"column_id": "Avg",
|
||||
"filter_query": "{Unit} = Pct && {Avg} > 50",
|
||||
"whiteSpace": "normal",
|
||||
"height": "auto",
|
||||
}
|
||||
if IS_DARK
|
||||
else {}
|
||||
),
|
||||
style_data_conditional=(
|
||||
[
|
||||
{"if": {"row_index": "odd"}, "backgroundColor": "rgb(60, 60, 60)"},
|
||||
{
|
||||
"if": {"column_id": "PoP", "filter_query": "{PoP} > 50"},
|
||||
"backgroundColor": "#ffa90a",
|
||||
"color": "white",
|
||||
},
|
||||
"backgroundColor": "#ffa90a",
|
||||
"color": "white",
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"column_id": "Avg",
|
||||
"filter_query": "{Unit} = Pct && {Avg} > 80",
|
||||
{
|
||||
"if": {"column_id": "PoP", "filter_query": "{PoP} > 80"},
|
||||
"backgroundColor": "#ff120a",
|
||||
"color": "white",
|
||||
},
|
||||
"backgroundColor": "#ff120a",
|
||||
"color": "white",
|
||||
},
|
||||
]
|
||||
if IS_DARK
|
||||
else [],
|
||||
{
|
||||
"if": {
|
||||
"column_id": "Avg",
|
||||
"filter_query": "{Unit} = Pct && {Avg} > 50",
|
||||
},
|
||||
"backgroundColor": "#ffa90a",
|
||||
"color": "white",
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"column_id": "Avg",
|
||||
"filter_query": "{Unit} = Pct && {Avg} > 80",
|
||||
},
|
||||
"backgroundColor": "#ff120a",
|
||||
"color": "white",
|
||||
},
|
||||
]
|
||||
if IS_DARK
|
||||
else []
|
||||
),
|
||||
# the df to display
|
||||
data=display_df.to_dict("records"),
|
||||
)
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user