ganttrify
ganttrify copied to clipboard
Mapping wp values to colours to enable legend & custom ordering of bars
For starters, what an awesome package! Also, this PR corresponds to issue #54 -- ended up figuring it out!
I am using this a bit differently than it was designed for -- instead of project planning, I am using it to depict project work done. I am part of a dynamic team that provides technical support to different groups and the team leader is looking for a gantt chart depicting all the different project supported since 2020 through to present.
I have edited the ganttrify function to:
- Use an arg,
order_by, to inform the ordering (top to bottom) of bars/projects - Following on to that, a new arg
order_ascending, to indicate type of ordering - Use an arg,
colour_by, that allows specification of which column to use for colouring the project bars - Ensure the values of the
colour_byfield are mapped to actual colors to enable inclusion of a useful legend - Use an arg,
include_legend, to keep legend for colour_by field; also added necessary adjustments to make sure mapping was done properly - Following on to
include_legend, also added an arg,legend_titleto allow the user to specify a legend title. - Added necessary strsplit() header information corresponding to each new arg
New args:
- colour_by
- order_by
- order_ascending
- include_legend
- legend_title
Woohoo!
Thanks a lot for taking the time! I'm travelling these days, but in the coming weeks I should be able to take a look!