cardiomoon / webr

31 stars 18 forks source link

Display absolute values instead of percentages #23

Open jassler opened 8 months ago

jassler commented 8 months ago

Inspired by this StackOverflow question, it would be nice to have a little more flexibility when displaying the values below labels. Currently, showRatioDonut and showRatioPie can only be set to TRUE or FALSE to show or hide the values.

Proposed solution

The parameters showRatioDonut and showRatioPie could instead be assigned a character string value or a function.

To stay backward compatible, we'd only have to verify if showRatioDonut or showRatioPie is a logical value - if so, then it needs to be reassigned the appropriate string value ("percentage" for TRUE, "none" for FALSE).