dash-docs
dash-docs copied to clipboard
Document workarounds for "graphs within tables"
There are a couple of workarounds right now:
- For the chart above (solid blocks of color within a cell), you could implement this using custom
linear-gradientstyles. See the "diverging data bars" example in https://dash.plotly.com/datatable/conditional-formatting - For simple spark lines, you could try using a custom sparkline font, see e.g. https://community.plotly.com/t/sparklines-as-fonts-embedding-minimal-sparklines-in-tables-components/39468
- You can embed arbitrary components in
html.Table. You would need to embed your own sorting or filtering dropdowns in the headers of the table. - You could create static images of charts and embed those images into cells with the markdown features. See https://plotly.com/python/static-image-export/
Originally posted by @chriddyp in https://github.com/plotly/dash-table/issues/292#issuecomment-663288581
Could be part of or could reference the "HTML Tables vs DataTable" chapter