What is the most optimal way to include a legend into an achievement plot? We would want:
to create some sort of function that is a wrapper around scale_[fill/color]_identity and guides,
possibly user input to have a legend that returns the achv_desc (eg On target), achv_label (eg 90-110%), or combination (eg On target (90-110%)).
include all levels in the legend, possibly use scale_[fill/color]_manual(values = x, drop = FALSE) instead
figure out if there is a way to order the values correctly without having to make the user order anything themselves (the below code requires the user add a more complicated fill param, fill = factor(achv_color, achv_color_map$achv_color)))
What is the most optimal way to include a legend into an achievement plot? We would want:
scale_[fill/color]_identity
andguides
,achv_desc
(egOn target
),achv_label
(eg90-110%
), or combination (egOn target (90-110%)
).scale_[fill/color]_manual(values = x, drop = FALSE)
insteadfill
param,fill = factor(achv_color, achv_color_map$achv_color))
)