Problems with ggplot

This is a different question and not possible to implement in ggplot2 as it is a static plot (implement it in shiny could be a possibility), so please don't go off-topic in your own thread and make this question on a new topic providing a relevant REPRoducible EXample (reprex)