shosaco / vistime

Pretty timelines in R.
https://shosaco.github.io/vistime
GNU General Public License v3.0
168 stars 11 forks source link

Plot Conflict Issue #22

Closed ElhamAbiri closed 3 years ago

ElhamAbiri commented 3 years ago

Hi, Vistime is really great, thank you!

I found one issue when events are nested (i.e, a range is completely inside another range) in which the vistime doesn't allocate different rows when plotting them, so events will be plotted on top of each other (when optimize_y = TRUE).

Looking at your set_y_values.R code, I think if we change case2 condition as below, it will fix the conflict issue:

toAdd$start >= all_on_current_y[j,"start"] & toAdd$start <= all_on_current_y[j,"end"]

It will be great if you can update it or let me know if I'm missing anything.

Thanks, Elham

Data Graph

shosaco commented 3 years ago

Thanks! Fixed in 179e479 by splitting up case 4. (Case 2 is for events).