The code below
from dash import Dash
import dash_table
import pandas as pd
df = pd.DataFrame({"data": [1, 2, 3, 4, 5]})
app = Dash(__name__)
app.layout = dash_table.DataTable(
id="table",
columns=[{"name": i, "id": i} for i in df.columns],
data=df.to_dict("records"),
style_data_conditional=[
{
"if": {
"filter_query": "{data} >= 3",
},
"backgroundColor": "yellow",
"clipPath": "circle()",
}
],
)
if __name__ == "__main__":
app.run_server(debug=True)
results in this
The clip-path is not added to the inline styles. This is also the case for other style properties like border radius.
But if I add the inline styles manually it does work
Am I missing something or is this not supported?
I could of course add the clipping path via css, but the goal is to conditionally show different shapes based on the data.
1 post - 1 participant












