nhs-r-community / NHSRplotthedots

An SPC package to support NHSE/I 'Making Data Count' programme
https://nhs-r-community.github.io/NHSRplotthedots/
Other
47 stars 22 forks source link

Plotly legend shows unformatted colours #177

Open tomjemmett opened 1 year ago

tomjemmett commented 1 year ago

The ggplot object uses a formatter in scale_colour_manual (labels = ptd_title_case) to convert text like "common_cause" to "Common Cause". It also hides the title "point_colour".

While we base the plotly chart off of the ggplot code, it does not use the formatter in the legend, and it also shows the legend title. This could do with being cleaned up, but it's not immediately obvious from the plotly docs how to do this