Skip to content
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

custom annotation of charts got broken in R4.4 #53

Open
oleksii-nikolaienko opened this issue Jun 11, 2024 · 1 comment
Open

custom annotation of charts got broken in R4.4 #53

oleksii-nikolaienko opened this issue Jun 11, 2024 · 1 comment

Comments

@oleksii-nikolaienko
Copy link

Hi and thanks for such an excellent package. The question I have is related to adding custom elements to the chart using annotate, geom_text or geom_segment to produce something like this:

image

This hack used to work well in R4.3 but not in R4.4, where in the latter, these custom elements cannot find their correct position on y-axis anymore:

ganttrify(project=ganttrify::test_project) + geom_text(aes(x=as.Date("2025-02-01"), y=ganttrify::test_project$activity[1], label="text"))
or
ganttrify(project=ganttrify::test_project) + annotate("text", x=as.Date("2025-02-01"), y=ganttrify::test_project$activity[1], label="label")

image

Is this by design or can this possibly be fixed?

@oleksii-nikolaienko
Copy link
Author

Ok, sorry, I missed that there was an update of ggantrify introducing the following.

This
ganttrify(project=ganttrify::test_project) + annotate("text", x=as.Date("2025-02-01"), y=paste(ganttrify::test_project$wp, ganttrify::test_project$activity, sep="_")[1], label="label")
fixes custom annotations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant