Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Datatable: “style_data_conditional” - several conditions

$
0
0

@Masya wrote:

Hi,
So can I indicate in some way several conditions?
next code doesn’t work:

style_data_conditional=[
                    {
                        'if': {
                            'row_index': 3,
                            'column_id': i,
                            'filter_query': '{' + str(i) + '} > 100'
                        },
                        'backgroundColor': '#99EE6B'
                    } for i in col_list,
                   {
                       'if' : {
                           'row_index' : 3,
                           'column_id' : i,
                           'filter_query' : '{' + str(i) + '} < 100'
                       },
                       'backgroundColor' : '#FF7373'
                   } for i in col_list

                ]

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images