giocomai / ganttrify

Create beautiful Gantt charts with ggplot2
https://ganttrify.europeandatajournalism.eu/
GNU General Public License v3.0
654 stars 61 forks source link

Added new 'add_border' arg for adding outline to line-shapes & corrected color mapping logic #58

Open erstearns opened 1 month ago

erstearns commented 1 month ago

New boolean arg: 'add_border' allows user to add a gray border around each line. This is very helpful if you have a palette with light colors as it makes them pop a bit more against the background and thus easier to see. In reality, this is another ggplot2 segment layer with a width of 1 + size_activity and colored gray. Future improvements could include the addition of args for setting this 'outline' layer width and color.

Also found and corrected an error early in the function that checks whether the user has the same number of colors in their palette as they do unique values of 'wp'. The error did not affect functionality, just message back to the user was note correct.