covid-dashboard icon indicating copy to clipboard operation
covid-dashboard copied to clipboard

Row colors in table

Open GaelVaroquaux opened this issue 4 years ago • 4 comments

We should change the color for the selected countries: ~~https://plot.ly/python/table/#row-color-based-on-variable~~ https://dash.plot.ly/datatable

GaelVaroquaux avatar Mar 16 '20 13:03 GaelVaroquaux

Hi, I would be happy to work on this

mrastgoo avatar Mar 17 '20 21:03 mrastgoo

Hi @mrastgoo great to see you here! It's awesome if you want to take a look but I gave it a try earlier on and I could not find an easy way to do this, basically there is not styling attribute for selected rows in a Dash Datatable. Other issues such as #48 or #46 might be easier to get started.

emmanuelle avatar Mar 17 '20 21:03 emmanuelle

A possible strategy would be to have a hidden column (with conditional styling as described in https://github.com/covid19-dash/covid-dashboard/blob/master/make_figures.py#L49 in the last post), which value would be updated when the row is selected thanks to a callback (which would have to be clientside, ie in Javascript since we make a dump of the app into static html pages), and then to have conditional styling for the value of the column. Haven't tried it though, and it's a bit convoluted, but it's worth trying I guess :-).

emmanuelle avatar Mar 17 '20 21:03 emmanuelle

@mrastgoo great to see you here! It's awesome if you want to take a look but I gave it a try earlier on and I could not find an easy way to do this, basically there is not styling attribute for selected rows in a Dash Datatable. Other issues such as #48 or #46 might be easier to get started.

Thanks Emma, I will work on the new issues #48 then

mrastgoo avatar Mar 17 '20 21:03 mrastgoo