Skip to content

Mapping wp values to colours to enable legend & custom ordering of bars #54

Description

@erstearns

Hello there!

For starters, thanks so much for making this awesome package!

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 am trying to use the wp field to colour projects, and order project bars by start date. Then I want to add a legend so the viewer knows which projects map to which groups (I've removed the WP labels on the Y axis). Currently when I try to add a legend, the values are just hex codes so it seems the WP values are not actually mapped to the colors.

I am trying to edit the code myself (I forked the repo) and in summary do the following:

  • Create an order_by arg that will inform the ordering (top to bottom) of projects
  • Create a colour_by arg (character field) that will allow specification of which column to use for colouring the project bars
  • Ensure the values of the colour_by field are mapped to actual colors to enable addition of a legend
  • Create an add_legend arg (TRUE/FALSE) to add legend for colour_by field

While I am going to try to do this, if any of this already exists or is slotted for development on your end, it would be great to know! Thanks again for all the great work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions