โœŠ๐Ÿฟ Black Lives Matter. Please consider donating to Black Girls Code today.
๐Ÿ‡ Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Dash Table - Conditional Headers Formatting for Multi-Headers Tables

Hi all, I created a dash table with multi-headers structure as described in the documentation (https://dash.plotly.com/datatable/style), what I am trying to do now is to apply conditional formatting to the multi-headers in order to set different colors background for each of the headers and subheaders according to their columns_id and header_index properties. The desired output should look like the example below (excel screenshoot):

Thus, I would kindly ask you whether this is feasible and if so, if you could provide an illustrative example of how that can be achieved.

Many thanks in advance.

Try the new style_header_conditional property (introduced in Dash 1.12.0). We donโ€™t have any examples yet, but the syntax is similar to style_data_conditional which is documented here: https://dash.plotly.com/datatable/conditional-formatting