Hey everybody –
I’m pleased to share a new documentation chapter on Conditional Formatting with the DataTable:
Conditional Formatting | Dash for Python Documentation | Plotly
This is the latest installment of our documentation push! Previously, we shared in announcements
- 📣 New Documention on Setting DataTable & Column Widths & Heights - #3 by shefali2909
- 📣 Dash Callbacks documentation improvements (including clientside examples!) - #2
- 📣 Dash v1.11.0 Release - Introducing Pattern-Matching Callbacks - #31 by MM-Lehmann
- 📣 Updated Documentation - Looking for feedback - #7 by BigSteak4
Conditional formatting in the DataTable allows you to style particular cells based off of data. There were many questions about this in the forum, we hope that this documentation chapter helps address any questions going forward
Here are some screenshots of a few of my favorite examples:
All of the options!
Filtering by column, range of values, data column type, comparing columns to each other, and more!
Displaying stars and icons in the DataTable
Highlighting top 10% of values:
Highlighting above and below average:
Highlighting empty values:
DataTable meets Heatmap
Data Bars! Bar Chart Embedded within the DataTable
The full list of examples in this chapter:
- Conditional Formatting
- Alternative Highlighting Styles
- Special characters like emoji, stars, checkmarks, circles
- Filtering & Conditional Formatting Recipes
- Highlighting the max value in a column
- Highlighting a row with the min value
- Highlighting the top three or bottom three values in a column
- Highlighting the max value in every row
- Highlighting the top two values in a row
- Highlighting the maximum value in the table
- Highlighting a range of values
- Highlighting top 10% or bottom 10% of values by column
- Highlighting values above average and below average
- Highlighting None, NaN, or empty string values
- Displaying special values for NaN or None values
- Highlighting text that contains a value
- Highlighting text that equals a value
- Highlighting cells by value with a colorscale like a heatmap
- Highlighting with a colorscale on a single column
- Displaying data bars
- Data bars without text
- Diverging data bars
- Highlighting dates
This chapter on conditional formatting is here: Conditional Formatting | Dash for Python Documentation | Plotly
Would love to hear any feedback or any other requests for examples. Enjoy!