✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Highlighting cells by value with a colorscale like a heatmap

I am trying to implement the highlighting cells by value with heatmap. The heatmap legend appears but no cells are colored. There are also no tick values for the legend. Does someone know why?

html.Div(legend, style={'textAlign': 'center'}),
dash_table.DataTable(
                                id='heatmap-table',
                                columns = [
                                    {"name": i, "id": i, "selectable": True} for i in df.columns
                                ],
                                data = df.to_dict('records'),
                                sort_action='native',
                                style_table={
                                    'minWidth': '100%',
                                    'height': '500px',
                                    'overflowY': 'auto',
                                },
                                style_cell={
                                    'textAlign': 'center',
                                    'minWidth': '80px', 'width': '100px', 'maxWidth': '120px',
                                },
                                style_header={
                                    'fontWeight': 'bold',
                                },
                                style_data_conditional=styles

                            ),

the problem was that one value was “inf” so the coloring function could not set up the ranges correctly.