statist7 / LMSgrowth2

MIT License
2 stars 2 forks source link

Use Plotly and DT for rendering plots and tables in centile tab #31

Closed giordano closed 4 years ago

statist7 commented 4 years ago

Having a global variable for the number of decimal places is excellent. How would it be to have one for the number of significant digits as well? This would avoid giving the age in days to two decimal places, for example. So numbers would be formatted to not exceed either of the two limits.

This would fit with the philosophy in my editorial, of controlling both decimal places and significant digits.

However I remember you saying this is hard to implement, other than by creating an image of the table. Perhaps we leave it for now, as the centile table may end up being less important than the centile plot.

As a compromise, could we have a global variable for significant digits, but not apply it yet to the centile tab?

giordano commented 4 years ago

A couple of screenshots to show how this looks like:

image

image

statist7 commented 4 years ago

Sorry to be offline for so long.

This is starting to look really good - plotly is amazing.

Just a few comments on plotly:

  1. Can the centile legend be reversed so it matches the order of the curves? Or would it be tidier to replace the legend with labels to the right of each centile? I can imagine this might upset some of plotly's clever features.

  2. The numbers displayed when cursoring over the plot have too many digits (sorry...). Can they be linked to the global significant digit count?

  3. We need to rethink the role of the centile table now we have the plot available. Could the table display be toggled with a button, perhaps next to the sexes?

  4. Some of the plotly features don't seem to work, e.g. the download. Some may be because there are no points.