Closed mcguinlu closed 4 years ago
Keen to help out if you can provide further details.
Hi @AJFOWLER,
Thanks again for reaching out and getting involved!
In essence, this issue is about allowing users, as part of the "Generic" template, to produce robvis
figures where all text is in another language. Users can currently change the titles of the domains to a different language by renaming the columns in the uploaded CSV or Excel file, but the X (currently "Risk of bias domains") and Y ("Study") axis titles, and the risk of bias judgements (currently "Low", "Unclear", "High", "Critical", "No information", "Not applicable") are hard coded (e.g. see here for the line hard-coding the "Risk of bias domains" axis label in the "Generic" template).
So my thinking was that, as this will only be applicable to the "Generic" template, we redefine the function to take an optional argument, like:
rob_traffic_light(data, tool, color, psize, quiet, ...)
And then users would be able to use this to define the elements mentioned above when using the "Generic" template, e.g.:
rob_traffic_light(
data = robvis::data_rob2,
tool = "Generic",
x_title = "Risk of bias", # Optional arguments begin
y_title = "Title",
judgement_labels = c("Low", "Unclear", "High", "Critical", "No information", "Not applicable")
)
Note, this is just the way I was thinking of doing it, but if you have any alternative approaches, feel free to try them out! And please let me know if anything is unclear.
Thanks to some great work by @AJFOWLER, this has been closed in https://github.com/mcguinlu/robvis/pull/92 🥳
[If you are interested in helping out with this issue, comment below and I can provide more details! Thanks in advance for your interest.]
As suggested by Neill Booth of Summaryx via email:
This is all feasible, though making the "Overall" column title changeable will require changes to the code, as this is how the template works out what the last column is (required as the number of columns for the "Generic" template is not fixed).