shosaco / vistime

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

Reordering the bars #9

Closed semenoffalex closed 5 years ago

semenoffalex commented 5 years ago

Thanks for a great package.

Is there a way to arrange the order of bars by start date or any other column of the data.frame or at least preserve the original order from the data.frame?

shosaco commented 5 years ago

Right now the bars are ordered automatically to optimize y-space. I could add a switch for that to only optimize y-axis if switch is TRUE and leave the order as given in the input-data otherwise.

shosaco commented 5 years ago

Added a new argument optimize_y to the function. Use optimize_y = FALSE to use the order of the input data. Does this fix your problem? Try it out using devtools::install_github("shosaco/vistime"). @semenoffalex

semenoffalex commented 5 years ago

Great, it did the job! Thank you.