covid19-dash / covid-dashboard

Help welcomed if you have expertise in public health web technology, data modeling and munging, or visualization.
https://covid19-dash.github.io/
BSD 3-Clause "New" or "Revised" License
134 stars 41 forks source link

Row colors in table #26

Open GaelVaroquaux opened 4 years ago

GaelVaroquaux commented 4 years ago

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

mrastgoo commented 4 years ago

Hi, I would be happy to work on this

emmanuelle commented 4 years ago

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 commented 4 years ago

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 :-).

mrastgoo commented 4 years ago

@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