-
Notifications
You must be signed in to change notification settings - Fork 66
Too many month columns #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Unfortunately (or, perhaps, fortunately), I cannot reproduce your issue. However, I still see issues with your code. In particular, if you input dates as dates, rather than month numbers, you should set If this fixes your issues, you can close this issue. If not, please add more details (ideally, a piece of code I can use to reproduce the issue, similar to the code you see below). library("ganttrify")
project_df <- tibble::tribble(~wp, ~activity, ~start_date, ~end_date,
"WW1 Journals", "Aussie", "1918-01-01", "1918-10-01",
"WW1 Journals", "Kia Ora", "1918-03-15", "1918-12-15")
gantt_gg <- ganttrify(project = project_df,
hide_wp = TRUE,
project_start_date ="1918-01-01",
by_date = TRUE,
month_number_label = FALSE,
font_family = "Roboto Condensed")
gantt_gg ggplot2::ggsave(filename = "my_wide_gantt.png",
plot = gantt_gg,
width = 12,
height = 4,
bg = "white") Created on 2022-09-03 with reprex v2.0.2 |
I got it working; the problem was further up I had this line #format Date I took it out and it now works |
I see. The reason why this column needs to be of class character, rather than date, is because it is made to accept also dates given as months (e.g. "2022-09" to refer to August 2022, without needing to say the exact day). In brief, the issue here is that the package didn't give a meaningful error message, which would have made it easy for you to fix this in a few minutes. So this falls under issue 11: #11 Hopefully I'll deal with in the coming months. |
I have an odd issue
I;ve tested it with two rows.
My data is as follows
and the code I am using is as follows
`gantt_gg<-ganttrify(project = covRecords2,
hide_wp = TRUE,
project_start_date ="1918-01",
font_family = "Roboto Condensed")
ggplot2::ggsave(filename = "my_wide_gantt.png",
plot = gantt_gg,
width = 12,
height = 4,
bg = "white") #otherwise you'll get transparent background`
On the output, however, i have way more columns for months as you can see
The text was updated successfully, but these errors were encountered: